In message <[EMAIL PROTECTED]>, whoisquilty <[EMAIL PROTECTED]> writes >James - Sorry, I knew I was missing something in my initial post. > >The column that $prodvar is set from is an INT column. > >And the error that I get is: > >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 'ORDER BY yearopen' at line 4 > >Looking at my code: > >"SELECT * > FROM productions > WHERE showno = $prodvar > ORDER BY yearopen"; > >...the Where statement is the problem. If I remove the Where statement, it >works >fine. I >tried the previous suggestion of putting $prodvar as '$prodvar' or >".$prodvar." >Neither >worked. '$prodvar' returned no results. And ".$prodvar." gave me the same >error >as above.
Have you tried ECHOing the sql statement before trying to use it? What is $prodvar set to? Is it even set? > >Unfortunately, I can't find listed anywhere on my the phpMyAdmin site that I'm >using >anything that indicates what version of MySQL or PHP that is installed. The >version of >phpMyAdmin that is being used is 2.7.0.-pl2 Create a page with just <?php phpinfo() ?> on it, upload it, and view it. -- Pete Clark Sunny Andalucia http://www.hotcosta.com/comm_1.htm
