In message <[EMAIL PROTECTED]>, whoisquilty
<[EMAIL PROTECTED]> writes
>Good advice. I'll try it out. But the problem occurs before the query. I tried 
>printing $var 
>prior to the query and it does not print. Then, I get the error:
>
>"You have an error in your SQL syntax. Check the manual that corresponds to 
>your 
>MySQL 
>server version for the right syntax to use near 'WHERE begins = '0'' at line 4"

The SQL is in the wrong order - should be
$query = "
 SELECT *
  FROM shows
  WHERE begins = '$var'
  ORDER BY sorttitle";

>> PHP will NOT substitute values for variables that are enclosed in single 
>> qoutes -
The single quotes are correct, the entire value is enclosed in double
quotes - but the order of SQL phrases was not - WHERE comes before ORDER
BY.

I assume that you have now got rid of the $var=0 issue, since you have
removed the FLOOR() command?

-- 
Pete Clark

Sunny Andalucia
http://hotcosta.com/Andalucia.Spain

Reply via email to