Date: 10/12/01
- Next message: Sommai Fongnamthip: "[PHP-DB] pivot table"
- Previous message: Peter Brown: "[PHP-DB] Multiple INSERT using for() into a MySQL database"
- Maybe in reply to: Peter Brown: "[PHP-DB] Multiple INSERT using for() into a MySQL database"
- Next in thread: Peter Brown: "Re: [PHP-DB] Multiple INSERT using for() into a MySQL database"
- Reply: Peter Brown: "Re: [PHP-DB] Multiple INSERT using for() into a MySQL database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
peter, you have a couple ";" in places where you don't want them
for($i=1, $i<12, $i=$i+1) {; <---- remove this one
}; <---- remove this one
try that out :)
/beau
// -----Original Message-----
// From: Peter Brown [mailto:peter <email protected>]
// Sent: Friday, 12 October 2001 11:50 AM
// To: php-db <email protected>
// Subject: [PHP-DB] Multiple INSERT using for() into a MySQL database
//
//
// Hi
//
// Novice question time.
//
// I am attempting to do a multiple INSERT by creating 11
// records in a MySQL
// database using a for() control structure.
//
// The code snippet is as follows
//
// for($i=1, $i<12, $i=$i+1) {;
// $query2 = "INSERT INTO
// ausPermisions(permView,permEdit,permAdd,permDelete,userID,modID)
// VALUES('N','N','N','N','$id','$i')";
// $result2 = mysql_query($query2) or die("doh!");
// };
//
// the $id is already defined and yes the modID is supposed to
// correspond to
// the value of $i
//
// I keep on getting the ... parse error, expecting `';'' ... error
//
// Anyhow, I am a beginner with PHP and was wondering wondering
// why \this
// doesnt work. If I'm not doing this the right way any advice
// etc would be
// great.
//
// Thanks
// Peter
//
//
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: php-db-unsubscribe <email protected>
// For additional commands, e-mail: php-db-help <email protected>
// To contact the list administrators, e-mail:
// php-list-admin <email protected>
//
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sommai Fongnamthip: "[PHP-DB] pivot table"
- Previous message: Peter Brown: "[PHP-DB] Multiple INSERT using for() into a MySQL database"
- Maybe in reply to: Peter Brown: "[PHP-DB] Multiple INSERT using for() into a MySQL database"
- Next in thread: Peter Brown: "Re: [PHP-DB] Multiple INSERT using for() into a MySQL database"
- Reply: Peter Brown: "Re: [PHP-DB] Multiple INSERT using for() into a MySQL database"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

