You are here: Re: mysql_query strangeness (misreported syntax error?) « All PHP « IT news, forums, messages
Re: mysql_query strangeness (misreported syntax error?)

Posted by J.O. Aho on 06/09/07 16:54

Mark Nenadov wrote:
> On Sat, 09 Jun 2007 07:33:06 -0700, ZeldorBlat wrote:
>> Where did you get the query above? Try echo'ing out the value that
>> you're passing to mysql_query() to make sure it's what you think it is.
>
> I wrote the query myself.
>
> As indicated in my post, I've tested that query out in the mysql console
> and it works. What I did was: echo the query. Take that text and paste it
> right into the mysql console.
>
> I'm presuming there must be something in that query that is supported by
> MySQL, but not the PHP MySQL API.
>

Even if you have done the query yourself and you are 100% sure you done it
right, it's always good to print it out

echo mysql_errno().": ".mysql_error()."<br>".$query;

PHP itself will not parse or execute the query, but just deliver it to the
mysql server.

--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация