FeedAgg.com Logo
Your Account | Sign In | Sign Up

Add Feed | Search | Home | Help | Contact | Blog

Feed: The PRADO Community - AggScore: 49.1



Summary: The PRADO Community


Live information from The PRADO Community

Re: TTemplateException Description: Invalid template syntax: Property text is confi


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



Re: ActiveRecord + bind + $_POST ??


10x ctrlaltca !

I tried this and it works!

.page
Code:








myAR.php
Code:
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
Code:
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...';}
}

 Grin
Date Published: May 30, 2012 - 9:17 am



Re: ActiveRecord + bind + $_POST ??


You can implement something like that using THttpRequest.
Code:
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


Re: Why not release full Prado v3.1.10 or Prado v3.1.11 ?


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


[SOLVED] ActiveRecord + bind + $_POST ??


Hi!

I have a doubt

Is there a bind function/method in ActiveRecord to bind the dollarsignr_POST values??

for example

.page
Code:



...




AR.php
Code:
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
Code:
dollarsignrmyAR=myAR::finder()->bind(dollarsignr_POST);
dollarsignrmyAR->save();

with bind I'll avoid
Code:
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??  RollEyes

Regards
Date Published: May 28, 2012 - 7:15 am


Re: Why not release full Prado v3.1.10 or Prado v3.1.11 ?


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


Re: Prado - Donate Button


I want donate for PRADO.
Date Published: May 23, 2012 - 11:03 am


Re: Aplicaciones para moviles


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


Re: [RESOLVED]TActiveRecord and TConditional


good remark ;-)
Date Published: May 20, 2012 - 4:00 pm


Re: Why not release full Prado v3.1.10 or Prado v3.1.11 ?


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


tramadol no prescription cod


w8cn5Td (^_^.) >^_^< Tongue   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


Re: [RESOLVED]TActiveRecord and TConditional


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


Re: Why not release full Prado v3.1.10 or Prado v3.1.11 ?


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


Re: TActiveRecord and TConditional


ok, I tried with the TPanel and I obtained an other error concerning the ActiveRecord SQL. It seems that activerecord don't like this:

Code:
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

Code:
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  Cheesy

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


Re: Why not release full Prado v3.1.10 or Prado v3.1.11 ?


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


 
Visitor Rating: 5 (1) (Rate)

Story Clicks: 26

Feed Views: 156

Tags
Lenses (Add|?)

Comments (Log in to add)

Feed Details
Date Added: 01/20/2011
Date Approved: 01/20/2011
By: Anonymous
Search FeedAgg.com




3600 sp4254 serv 1.2613 seconds to generate.