Re: insert array values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've done some rethingking and this may be the direction to go:

What I need to wind up with is something like this:

$sql = "INSERT INTO book_categories ( book_id, category )
    VALUES( '$autoID', '$categoriesID[0]' ),
    ( '$autoID', '$categoriesID[1]' ),   
    ( '$autoID', '$categoriesID[2]' ),
    ( '$autoID', '$categoriesID[3]' )
    ( '$autoID', '$categoriesID[4]' )";

Does it make sense?
How do I pass the values to the query?
	


-- 
unheralded genius: "A clean desk is the sign of a dull mind. "
-------------------------------------------------------------
Phil Jourdan --- pj@xxxxxxxxxxxxx
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux