On Fri, 2007-01-26 at 16:30 +0000, Stut wrote: > tg-php@xxxxxxxxxxxxxxxxxxxxxx wrote: > > My contribution to the insanity.. INSERT statements made easy: > > > > $genericQY = "INSERT INTO MOD_LMGR_Leads ("; $genericQYvalues = " VALUES ("; > > $genericQY .= " FirstName,"; $genericQYvalues .= " 'John',"; > > $genericQY .= " LastName"; $genericQYvalues .= " 'Smith'"; > > $genericQY .= " )"; $genericQYvalues .= " );"; > > $genericQY .= $genericQYvalues; > > $genericRS = mysql_query($genericQY); > > You call that readable?? > > $vals = array(); > $vals['FirstName'] = 'John'; > $vals['LastName'] = 'Smith'; > $query = mysql_query(BuildInsert('MOD_LMGR_Leads', $vals)); Geee, you call that readable??? $vals = array ( 'FirstName' => 'John', 'LastName' => 'Smith', ); $query = mysql_query( BuildInsert( 'MOD_LMGR_Leads', $vals ) ); ;) ;) Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php