Re: FormBuilder help
| From: | Patrick Paul | Date: | Thu, 25 May 2006 17:44:39 +0000 |
| Subject: | Re: FormBuilder help | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24155@lists.php.net to get a copy of this message | ||
Thank you Justin, everything is working great.
Oh, and don't do this:I'm guessing this is because Data_Object does not support multi-field keys ? Is there any way to go around this other than adding an auto_inc PK to tables ? (I have 70 tables). Is it really that bad to do a "$description->keys('id');" ? Thank you, Patrick Justin Patrin wrote:$description->keys('id');Give your description table its own auto_inc PK.
On 5/24/06, Patrick Paul <ppaul_apache@yahoo.ca> wrote:First of all thank you for you quick response. I just subsribed to the mailing list a few hours ago and I'm receiving any mails and I don't know why. Anyways, regarding the problem at hand, I did what you told me and it works to create a new city in the cities table. However, the id used for the description is not set right and I'm not sure I understand what you meant by "Make sure to set the city ID in the description DO before you process it, though." What I want is the citites_id that has just been created for the cities table.Yes, as I said: $description->cities_id = $city->cities_id; Oh, and don't do this:$description->keys('id');Give your description table its own auto_inc PK.Thanks again, Patrick Justin Patrin wrote:But then you negate all of that here. You're using a description-only form from my last comment to here. That's not what you want. Instead of using $form, use $combinedForm. Then, to process, call $form->process with *both* of the formBuilder instances. First the city one, then the description one. Make sure to set the city ID in the description DO before you process it, though.*?>* Any help would be welcome. Thank you, Patrick -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php