Not enough information given to figure out what's going on, but looking at
your query i see:

"WHERE $cars =

 do you keep 6 different values separated by commas in the field referenced
by $cars??? If this is correct what values you are passing for all those
variables? Is the $cars variable set to a valid column name in the "test"
table?? What is the data type for the column that $cars references?


-----Original Message-----
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 12:26 AM
Subject: [PHP-DB] Parse Error

I hate to post this again but I have looked in a couple of php and mysql
books but cannot seem to figure this one out.  I am getting a parse error
when trying to use php to delete records from a table.  The error I am
recieving is as follows....

Parse error: parse error in /path/to/php/done2.php3 on line 22

Here is the file that is giving me the error, any help would be great... I
think that my problem is that I left out a variable to hold the $cars data
but I am not sure.  Here is the code...

$db_name = "test";
$table_name = "inventory";
$connection = @mysql_connect("localhost", "root", "password") or die
not connect to database.  Please try again later.");
$db = @mysql_select_db("$db_name",$connection) or die ("Could not select
database table. Please try again later.");
$sql = "DELETE FROM $table_name WHERE $cars =
$result = @mysql_query($sql, $connection) or die ("Could not execute

Any insight would be great... thanks again.

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to