Re: insert array values

From: Date: Fri, 06 Mar 2009 23:37:17 +0000
Subject: Re: insert array values
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-289508@lists.php.net to get a copy of this message
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@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php

« previous php.general (#289508) next »