» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-19-2006, 09:31 AM
speedy speedy is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
speedy is on a distinguished road
Default Error in select statement

Hi forum members

I have the following SELECT statement which aims to select data from the database for a month ago today however im getting an error message as shown below.


SELECT STATEMENT

$dbQuery="SELECT * FROM data WHERE ReportedDate BETWEEN date("Y-m-d", strtotime("-12months")) AND date("Y-m-d", strtotime("-11 months"))";

ERROR MESSAGE

Parse error: parse error, unexpected T_STRING

Any help is much appreciated in correcting the above select statement -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-19-2006, 09:32 AM
ashley ashley is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ashley is on a distinguished road
Default

unexpected T_STRING is a php error. you are not escaping your quotes

PHP Code:
$a = "as" af";

is invalid, if you want to have quotes in there, you have to escape them

PHP Code:
$a = "as\" af";

or end the quotes

PHP Code:
$a = "as ".time()." af";

Hope I was of little help -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
select radio button for given address mayurika General Talk 1 02-17-2007 07:19 AM
DISTINCT/SELECT statement? Crilon MySQL Forums 1 02-02-2007 06:45 AM
Where Statement? sugreeh MySQL Forums 1 11-03-2006 03:54 AM
nested select statement. PowerX MySQL Forums 1 09-30-2006 06:45 AM
MySQL Select Date comparisons functions? features? rice MySQL Forums 1 08-22-2006 01:21 PM


All times are GMT. The time now is 11:38 PM.