Array and insert statement throws error

From: Date: Fri, 15 Oct 2004 20:14:04 +0000
Subject: Array and insert statement throws error
Groups: php.db 
Request: Send a blank email to php-db+get-36831@lists.php.net to get a copy of this message
Trying to get array of values into table. Each value will be part of a new record, so it's a loop. I am getting a parse error though and for further down in the code though I know this is what's causing it. Is there anything wrong with this statement ? if ( is_array( $_SESSION['l_industry'] ) ) { foreach ( $_SESSION['l_industry'] as $p ) { $query = "INSERT INTO Profiles_Industries (ProfileID, IndID) VALUES ($LID, $p)"; } Stuart

« previous php.db (#36831) next »