Nested forms

From: Date: Thu, 21 Oct 2004 16:04:13 +0000
Subject: Nested forms
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15021@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm wrestling with the nested forms example from the slide show tutorial. This may be a bit over my head but I need it for my application. I found the example easy and it looks fantastic when applied to my tables. But it botches my database when it gets processed. It doesn't seem to do a last_insert_id() and insert the 'one' table's primary key properly into the 'many' table-- big trouble. If I do $many_builder->useForm($one_table) and $one_table->fb_createsubmit = false, I get ID's of zero, and only the many_table gets saved to the DB, the one_table does not. If I do $one_builder->useForm($many_table) and $many_table->fb_createSubmit = false, it displays a popup of my $one_table->id on screen, with a random ID (23). I suspect this may be an incrementing problem. But I can't use PHP's incrementing, I *must* use autoincrement and last_insert_id. The PHP code is not the only thing that will be modifying the database, it needs to have unique ID's and they need to be assigned by mysql. I feel like I may be doing something obviously wrong here, but after pounding on it a while I've no idea what. - -ken - -- - --------------- The world's most affordable web hosting. http://www.nearlyfreespeech.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd939e8HF+6xeOIcRAlU3AKCADKnduOANwFJ0qldKLXJRrcL0GACg2iKf dDPKLl59LUAClWxjiqCKYng= =TRgH -----END PGP SIGNATURE-----

« previous php.pear.general (#15021) next »