Summary: The PRADO Community
Live information from The PRADO Community
thanks for the solve, I also faced same type of problem, this post
really solve it. Thanks for share.
Date Published: May 31, 2012 - 3:08 am
10x
ctrlaltca !
I tried this and it works!
.page
myAR.php
class myAR extends TActiveRecord
{
const TABLE='table_1';
public dollarsignrpk;
public dollarsignrfield_1;
public dollarsignrfield_2;
public static function finder(dollarsignrclassName=__CLASS__)
{
return parent::finder(dollarsignrclassName);
}
public static function
bind(dollarsignrrequest,dollarsignrbind_pk=false)
{
dollarsignrclass= new self;
foreach(dollarsignrrequest as
dollarsignrname=>dollarsignrvalue)
{
dollarsignrname=explode('dollarsignr',dollarsignrname);
dollarsignrsize=count(dollarsignrname);
if(property_exists(get_class(dollarsignrthis),dollarsignrname[dollarsignrsize-1]))
dollarsignrclass->dollarsignrname[dollarsignrsize-1]=dollarsignrvalue;
}
if(dollarsignrbind_pk)
dollarsignrclass->_recordState=1; // to
update
return dollarsignrclass;
}
}
.php
public function
btnOK_Click(dollarsignrsender,dollarsignrparam)
{
//insert
dollarsignrmyAR = myAR::bind(dollarsignr_POST);
if(dollarsignrmyAR->save()){echo 'INSERT OK!';}
else{echo 'ERROR...';}
//update
dollarsignrmyAR = myAR::bind(dollarsignr_POST,true);
dollarsignrmyAR->pk=1;
if(dollarsignrmyAR->save()){echo 'UPDATE OK!';}
else{echo 'ERROR...';}
}

Date Published: May 30, 2012 - 9:17 am
You can implement something like that using THttpRequest.
dollarsignrrequest=dollarsignrthis->getPage()->getApplication()->getRequest();
// traverse post data
foreach(dollarsignrrequest as
dollarsignrname=>dollarsignrvalue)
{
dollarsignrmyAR->dollarsignrname=dollarsignrvalue;
}
Of course you need to ensure that post data is valid,
contents are secured, etc..
Date Published: May 28, 2012 - 11:08 am
I prefer not to say anything if i can't keep the promise. Anyway,
if you want to get your hands dirty on the new version just
download it from the repository: on this site click the
"Development" link and then follow the "Source" tab in googlecode's
prado 3 page. You'll need subversion.
Date Published: May 28, 2012 - 10:59 am
Hi!
I have a doubt
Is there a
bind function/method in ActiveRecord to
bind the dollarsignr_POST values??
for example
.page
...
AR.php
class myAR extends TActiveRecord
{
const TABLE='table_1';
public dollarsignrfield_1;
public dollarsignrfield_2;
public dollarsignrfield_3;
...
public static function finder(dollarsignrclassName=__CLASS__)
{
return parent::finder(dollarsignrclassName);
}
...
}
.php
dollarsignrmyAR=myAR::finder()->bind(dollarsignr_POST);
dollarsignrmyAR->save();
with bind I'll avoid
dollarsignrmyAR= new myAR;
dollarsignrmyAR->field_1=dollarsignrthis->field_1->Text;
dollarsignrmyAR->field_2=dollarsignrthis->field_2->Text;
dollarsignrmyAR->field_3=dollarsignrthis->field_3->Text;
...
dollarsignrmyAR->save();
Is this possible??
Regards
Date Published: May 28, 2012 - 7:15 am
An idee about the release date?
Indeed, I'am preparing a new release of my application, based on
PRADO, and I'am interesting to integrate the new version of
PRADO.
I would like to know this myself. Anyone have this
information. The new version date would be helpful?
Thanks
Date Published: May 27, 2012 - 2:54 pm
I want donate for PRADO.
Date Published: May 23, 2012 - 11:03 am
Hola taqtaq
Quisiera saber si has podido adelantar con este tema y si puedes
compartir mas información relacionada.
Saludos Cordiales,
Date Published: May 22, 2012 - 12:46 pm
good remark ;-)
Date Published: May 20, 2012 - 4:00 pm
An idee about the release date?
Indeed, I'am preparing a new release of my application, based on
PRADO, and I'am interesting to integrate the new version of
PRADO.
Date Published: May 20, 2012 - 4:00 pm
w8cn5Td (^_^.) >^_^<

Blow up L.G. (Light Green) Never
Been Nuthin' Stay strapped tramadol next day delivery no
prescription
tramadol no prescription next day LIMM Peel Back
PIMPL Shot Caller Nappy Stack NVM (*°?°)=3 ~?·_·?~ :-###..
>:/ tramadol no prescription d9rb0Vw
Date Published: May 20, 2012 - 1:33 am
I'm not sure, but is suppose this is caused by ActiveRecord being
dbms-agnostic. While the "identifier quote character" for mysql is
the backtick, for other databases it's different (eg: mssql's
square bracket).
Date Published: May 19, 2012 - 10:47 am
It surely feels more responsive, at least in my experience, due to
the use of progressive rendering.
Some previously custom routines (such as serialization) are now
using php's builtin functions, and this should lead to sligthly
better performances.
I've no real data from performance tests anyway..
Date Published: May 19, 2012 - 10:43 am
ok, I tried with the TPanel and I obtained an other error
concerning the ActiveRecord SQL. It seems that activerecord don't
like this:
dollarsignrres =
MGuiPermissions::finder()->findAll('(`page`='' .
dollarsignrpage . '' OR `page` IS NULL) ' .
"AND ("
.
"(`selector`='user_id' AND `value`=" . dollarsignrusedId . ") "
.
"OR
(`selector`='group_id' AND `value`=" . dollarsignrgroupId . ") "
.
") AND
`shortcut`=1 " .
'ORDER BY
`page` DESC');
I replace with
dollarsignrres = MGuiPermissions::finder()->findAll('(page=''
. dollarsignrpage . '' OR page IS NULL) ' .
"AND ("
.
"(selector='user_id' AND value=" . dollarsignrusedId . ") " .
"OR
(selector='group_id' AND value=" . dollarsignrgroupId . ") "
.
") AND
shortcut=1 " .
'ORDER BY
page DESC');
And it is ok. I try to come back with the TConditional and it
works
Maybe a bug in TActiveRecord: why not possible to use the following
char ` in a request?
I still need to understand why I have similar problem with
TDataGrid...
Thank you for your help!
Date Published: May 19, 2012 - 8:07 am
ok, thank you for you response.
What about the performance, is it better thant the current version?
Date Published: May 19, 2012 - 7:54 am