RE: [PHP] parse error, mysql select

2002-04-01 Thread Rick Emery

$query = SELECT DATE_FORMAT( exp_date, \%W, %M %d, %Y\) AS thedate from
tifrequest where user='$user' limit 1,1;

Missing escape \ in front of quotes

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 1:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] parse error, mysql select


When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = SELECT DATE_FORMAT( exp_date, %W, %M
%d, %Y) AS thedate from tifrequest where user='$user' limit 1,1;


Thanks!  My eyes are shot!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] parse error, mysql select

2002-04-01 Thread Matt Friedman

It doesn't like the ; at the end of the statement. I noticed this a
while ago. I'd prefer if it didn't choke on the ; but it seems to.
It's probably more correct to have the ; there - I don't know why it
chokes when going through php. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday April 1, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] parse error, mysql select

When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = SELECT DATE_FORMAT( exp_date, %W, %M
%d, %Y) AS thedate from tifrequest where user='$user' limit 1,1;


Thanks!  My eyes are shot!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] parse error, mysql select

2002-04-01 Thread Rick Emery

He's not including the ; in the SELECT statement.  The ; you're seeing is at
end of the PHP statement

-Original Message-
From: Matt Friedman [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 2:02 PM
To: 'ROBERT MCPEAK'; [EMAIL PROTECTED]
Subject: RE: [PHP] parse error, mysql select


It doesn't like the ; at the end of the statement. I noticed this a
while ago. I'd prefer if it didn't choke on the ; but it seems to.
It's probably more correct to have the ; there - I don't know why it
chokes when going through php. 

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
 

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday April 1, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] parse error, mysql select

When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = SELECT DATE_FORMAT( exp_date, %W, %M
%d, %Y) AS thedate from tifrequest where user='$user' limit 1,1;


Thanks!  My eyes are shot!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] parse error, mysql select

2002-04-01 Thread ROBERT MCPEAK

Ack!  Thanks.

 Rick Emery [EMAIL PROTECTED] 04/01/02 02:59PM 
$query = SELECT DATE_FORMAT( exp_date, \%W, %M %d, %Y\) AS thedate
from
tifrequest where user='$user' limit 1,1;

Missing escape \ in front of quotes

-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 01, 2002 1:55 PM
To: [EMAIL PROTECTED] 
Subject: [PHP] parse error, mysql select


When I execute from browser I get a parse error, but when I enter the
query directly into a MySQL command prompt I get a successful return. 
Can anybody see the problem with this code:

$query = SELECT DATE_FORMAT( exp_date, %W, %M
%d, %Y) AS thedate from tifrequest where user='$user' limit 1,1;


Thanks!  My eyes are shot!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php