Jump to content

MYSQL Query Problem


MadDawgX

Recommended Posts

Hey there.

 

What's wrong with the following syntax:

 

$qPost = "INSERT INTO chat (cat,by,rank,mes) VALUES ('$ChatPage','$LogUsername','$LogRank','$NewChat')";
$rPost = mysql_query($qPost) or die('Query failed. ' . mysql_error());

 

It's throwing:

 

Query failed. 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 'by,rank,mes) VALUES ('1','AlcanderX','4','Test')' at line 1
Link to comment
https://forums.phpfreaks.com/topic/37093-mysql-query-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.