Re: parse error, mysql select

From: Date: Mon, 01 Apr 2002 20:26:35 +0000
Subject: Re: parse error, mysql select
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91017@lists.php.net to get a copy of this message
Error is absolute. Don't use " (double quotation mark) in yur queries. Use ' (single quot.) instead $query = "SELECT DATE_FORMAT( exp_date, '%W, %M > %d, %Y') AS thedate from tifrequest where user='$user' limit 1,1"; Because the preprocessor think that your string is finished when it sees a double quot. And use a colorful editor. that helps u seeing errors like this. :) martina "Robert McPeak" <RMCPEAK@jhuccp.org> wrote in message news:sca874fc.098@ccp2.jhuccp.org... > 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! >

« previous php.general (#91017) next »