i am getting this error when trying to perform the following query:
$sql = mysql_query(\"select c.id as id_car, c.year, c.make, c.model, c.type, c.colour,
The value of $sql is probably false. This happens if the query you tried to execute failed to execute, usually due to a syntax error in the SQL.
Generally, you want your query code to look like this:
if ($result = mysql_query ('SELECT * FROM foo WHERE bar = \'baz\''))
{
// resultset processing goes here
while ($row = mysql_fetch_assoc ($result))
{
}
}
else
{
echo (mysql_error ());
}