ews Posted January 3, 2005 Share Posted January 3, 2005 I have written a query that runs from within dreamweaver when I test the SQL statement. However when I try to view the page from my server I get the following error Parse error: parse error, unexpected T_LNUMBER in /home/www/hillpark/entertainment/january.php on line 4 I can not see any reason for this, but i'm fairly new to this. I have posted the full text of the affected page here. http://www.hillparkclub.co.uk/helpalan.txt I would be grateful if anyone could tell me what is going wrong with what I have written. B) Quote Link to comment https://forums.phpfreaks.com/topic/2113-parse-error-parse-error-unexpected-t_lnumber-in/ Share on other sites More sharing options...
akitchin Posted January 3, 2005 Share Posted January 3, 2005 as it says, the error is on line 4. you're breaking out of your query definition prematurely by using double quotes. change: $query_entjanRS = "SELECT * FROM entertainment WHERE entertainment.`date`>="2005-01-01" AND`date`<="2005-01-31" ORDER BY entertainment.`date`"; to: $query_entjanRS = "SELECT * FROM entertainment WHERE date>='2005-01-01' AND date<='2005-01-31' ORDER BY date"; when selecting everything from one table, you don't need table designation in your field designations. Quote Link to comment https://forums.phpfreaks.com/topic/2113-parse-error-parse-error-unexpected-t_lnumber-in/#findComment-6927 Share on other sites More sharing options...
ews Posted January 4, 2005 Author Share Posted January 4, 2005 as it says, the error is on line 4. you're breaking out of your query definition prematurely by using double quotes. change: $query_entjanRS = "SELECT * FROM entertainment WHERE entertainment.`date`>="2005-01-01" AND`date`<="2005-01-31" ORDER BY entertainment.`date`"; to: $query_entjanRS = "SELECT * FROM entertainment WHERE date>='2005-01-01' AND date<='2005-01-31' ORDER BY date"; when selecting everything from one table, you don't need table designation in your field designations. 188719[/snapback] Thanks very much for your help. Ive got it working now. Quote Link to comment https://forums.phpfreaks.com/topic/2113-parse-error-parse-error-unexpected-t_lnumber-in/#findComment-6929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.