mySQL's Error[solved]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lala
Forum Commoner
Posts: 27
Joined: Mon Jul 26, 2010 7:56 pm

mySQL's Error[solved]

Post by lala »

I get this error in my php scripts. Anyone know what is this error? Thanks

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 project_id=' at line 1
Last edited by lala on Tue Aug 24, 2010 1:25 am, edited 1 time in total.
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: mySQL's Error

Post by Gargoyle »

it's quite clear actually... you produced invalid SQL code. fix it or provide the entire statement for us to be able to help you.
lala
Forum Commoner
Posts: 27
Joined: Mon Jul 26, 2010 7:56 pm

Re: mySQL's Error

Post by lala »

$id=$_GET['pid'];

.//SQL comment here
.
.

echo "<script language=javascript>alert(\"Records Saved\")</script>";
echo "<meta http-equiv='Refresh' content='0; url=../detail.php?id=$_GET[pid]'>";

last statement have problem:
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 '' at line 1
agriz
Forum Contributor
Posts: 106
Joined: Sun Nov 23, 2008 9:29 pm

Re: mySQL's Error

Post by agriz »

You need to post the sql query.
Post Reply