Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Linux, Apache, MySQL > MySQL Help

MySQL Help Post any question relating to MySQL here and hopefully someone can help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-04-18, 02:01 AM
Junior Member
 
Join Date: Apr 2007
Posts: 1
chaucheefui is on a distinguished road
Default How to resolve "You have an error in your SQL syntax; check the manual..."?

I am new to all of this stuff and Please help me to resolve this.

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 'out) as tout from hl_traffic where listing_id = 1 and date + interval 7 day > no' at line 1

First of all, I don't know what that mean.

My host provide :PHP version 4.4.6, MySQL version 5.0.27-standard

Here is the table I created.

id bigint(20) UNSIGNED No auto_increment
date date Yes NULL
listing_id bigint(20) UNSIGNED No 0
in bigint(20) UNSIGNED No 0
out bigint(20) UNSIGNED No 0

If you need more info about the problem, I will provide it for you.

If you know the problem, can you teach me step by step?

Thank You in advance.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2007-04-18, 01:37 PM
Senior Member
 
Join Date: Jul 2006
Location: Prague, Czech Republic
Posts: 193
vladimir_cz is on a distinguished road
Send a message via ICQ to vladimir_cz Send a message via MSN to vladimir_cz Send a message via Yahoo to vladimir_cz Send a message via Skype™ to vladimir_cz
Default

Please post your SQL query for find error.
__________________
Thank you. Vladimir, Czech Republic.
http://www.smartwebco.com/
I'm looking for job.
Reply With Quote
  #3 (permalink)  
Old 2007-06-25, 05:58 AM
Junior Member
 
Join Date: Jun 2007
Posts: 1
intoxic is on a distinguished road
Question

I have also this problem with my script:

There is an index.php file content:
http://aforum.informe.com/viewtopic.php?p=22

I think that this problem is in php/sql compatibility.

it have to be version 4, not 5..

Last edited by intoxic; 2007-06-25 at 06:09 AM.
Reply With Quote
  #4 (permalink)  
Old 2007-06-25, 05:28 PM
Junior Member
 
Join Date: Jun 2007
Posts: 1
ldivinag is on a distinguished road
Default

usually, when i issue a

Code:
$result = mysql_query ($sql);
next block of code is

Code:
if (!$result)  //  meaning that there was an error in the SQl statement...
{
  echo ("SQL: " . $sql . "\n";
  echo ("mysql_error() . ": " . mysql_errno() . "\n");
  die;
}
that way, it echoes the SQl statement so i can paste it into my fav mysql client and further view it.

plus, it dumps the mysql error # and message.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:13 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.