RE: Multiply Auto_Increments

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

 



Looking at the code you've pasted in below, I don't see anything that would
result in one valid row plus additional blank rows.

Is the code you supplied in a script with any control structures like IF,
WHILE, or FOR? Is it included into a script in the middle of a control
structure? If you answered yes to any of the above questions, is it supposed
to be? Have you closed those control structures prior to executing the
INSERT?

If there is more code in the script, can you please paste it all? It's
possitble something else higher up in the script is causing the problem.
Sorry I wasn't more specific the first time.

Rich

> -----Original Message-----
> From: Toby Parkins [mailto:toby@uknetweb.com]
> Sent: Wednesday, November 13, 2002 2:16 PM
> To: php-db@lists.php.net
> Subject: RE:  Multiply Auto_Increments
> 
> 
> 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
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux