RE: [PHP-DB] Multiply Auto_Increments
| From: | Toby Parkins | Date: | Wed, 13 Nov 2002 19:15:40 +0000 |
| Subject: | RE: [PHP-DB] Multiply Auto_Increments | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-23301@lists.php.net to get a copy of this message | ||
Richard,
Here is the code
$sql = "
INSERT INTO $table
(id,date,user,title,brief,body,expires,visible)
VALUES(NULL,\"$date\",\"$user\",\"$title\",\"$brief\",\"$body\",\"$exdate\",
\"1\")
";
$connection = mysql_connect($dbhost, $dbusername, $dbpass) or die ("Could
not connect to database");
$db = mysql_select_db($dbname) or die ("could not select db.");
$result = mysql_query($sql,$connection) or die ("Could not execute query");
The variables $date etc are from a POST form input
Any ideas?
Toby