Jump to content


Photo

Parse error: parse error, unexpected T_LNUMBER in


  • Please log in to reply
2 replies to this topic

#1 ews

ews
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationFareham, Hampshire, United Kingdom

Posted 03 January 2005 - 09:54 PM

:( 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.hillparkc...uk/helpalan.txt

I would be grateful if anyone could tell me what is going wrong with what I have written. B)

#2 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 03 January 2005 - 11:05 PM

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.

#3 ews

ews
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationFareham, Hampshire, United Kingdom

Posted 04 January 2005 - 10:56 AM

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.

View Post


;) Thanks very much for your help. Ive got it working now.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users