You are here: Re: local works, but live doesnt. « All PHP « IT news, forums, messages
Re: local works, but live doesnt.

Posted by Dave Nash on 01/11/07 10:57

On Thu, 11 Jan 2007 11:48:43 +0100, Peter van Schie
<vanschie.peter@gmail.com> wrote:

>Dave Nash wrote:
>> I have a site working locally fine with PHP
>>
>> Local php version = PHP Version 4.4.3
>> Live version = Version 4.3.2
>>
>>
>> Ive then moved the site live to test and I keep getting the following
>> error
>>
>> Couldn't execute query
>>
>> code is as follows.
>>
>> $query = "select * from categories where parentid = $catid";
>> $result = mysql_query($query) or die ("Couldn't execute query");
>
>Hi Dave,
>
>Try to get some more information about the error by using mysql_error():
>
>$result = mysql_query($query) or die ("Couldn't execute query: " .
>mysql_error());
>
>Ruben.

Thanks ruben.

it says.

Couldn't execute query: You have an error in your SQL syntax near ''
at line 1

But i cant seem to find the error.
I tried the same sql query directly on the live db and it wors fine.

????

 

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

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