Is $cars an array field?  If not, you are trying to compare $cars to an 
list/array of  values (I am not sure this would work even if $cars was an 
array field) 'WHERE $cars 
= "$car_type\",\"$car_model\",\"$car_year\",\"$car_price\",\"$car_vin\",\"$dlr
_num\"");'.  

Normally, you would have to compare each individual value in each requested 
field to a variable.  
Hard to say without more code.

MB


jas <[EMAIL PROTECTED]> said:

> 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
> ("Could
> 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 =
> \"$car_type\",\"$car_model\",\"$car_year\",\"$car_price\",\"$car_vin\",\"$dl
> r_num\"");
> $result = @mysql_query($sql, $connection) or die ("Could not execute
> query.
> 
> Any insight would be great... thanks again.
> Jas
> 
> 
> 
> 
> -- 
> 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

Reply via email to