View unanswered posts | View active topics It is currently Fri Jul 20, 2018 12:11 am



Reply to topic  [ 3 posts ] 
 How to resolve "You have an error in your SQL syntax; check the manual..."? 
Author Message
Junior Member

Joined: Tue Apr 17, 2007 11:51 pm
Posts: 1
Post 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.


Wed Apr 18, 2007 12:01 am
Report this post
Profile
Junior Member

Joined: Mon Jun 25, 2007 3:50 am
Posts: 1
Post 
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..


Mon Jun 25, 2007 3:58 am
Report this post
Profile
Junior Member

Joined: Mon Jun 25, 2007 3:23 pm
Posts: 1
Post 
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.


Mon Jun 25, 2007 3:28 pm
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.