RE: Strange Query Error...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Don Wieland [mailto:donw@xxxxxxxxxxxxxxxxxx]
> Sent: Saturday, November 27, 2010 10:18 AM
> To: Bastien
> Cc: php-general@xxxxxxxxxxxxx
> Subject: Re:  Strange Query Error...
> 
> On Nov 27, 2010, at 10:07 AM, Bastien wrote:
> 
> > Try removing the backticks around the table names. If you do use them,
> > then all values (field names and table names) need it.
> 
> I tried that and still chokes...
> 
> select m.* from Members m inner join Member_Years my on m.aucciim_id =
> my.member_id where now() < DATE_ADD(DATE_SUB(concat(member_year
> + 1,'-07-01'), INTERVAL 1 DAY), INTERVAL 30 DAY) AND
> m.Preferred_First_Name LIKE 'Don%' group by m.AUCCIIM_ID order by
> m.preferred_last_name
> 
> ERROR: You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use near
> 'AND m.Preferred_First_Name LIKE 'Don%'' at line 1
> 
> Sigh...
> 
> Don

Don,

Have you tried to run the query in either MySQL workbench or the command
line to ensure that query is SQL syntax error free?  From the error message,
it sounds more like a SQL syntax error.  If you're able to run the query
fine in the workbench or the command line, then it's a possibility there's a
bug with the mysql extension which I highly doubt.

Regards,
Tommy


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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux