Jump to content

Error In Syntax


greenbman

Recommended Posts

Ok here is the Error:

 

[color=#000000][font='Times New Roman'][size=1]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 'The Reply system works... So that means the entire Communications Array is up an' at line 1[/size][/font][/color]

 

 

This is the code now the message field is set to text in SQL


FUNCTION sendSloppyCheeseTransmission($to,$from,$subject,$message){

$date = date("Y-m-d H:i:s");
$time = time();

$q = "INSERT INTO `messages` SET `to` = '{$to}', `from` = '{$from}', `subject` = '{$subject}, `message` = '{$message}', `date` = '{$date}', `time` = '{$time}'";
$res = mysql_query($q) or die(mysql_error());

if(isset($res)){
return 1;
}
}

 

Any Help Would be Awesome,

greenbman

Link to comment
https://forums.phpfreaks.com/topic/272035-error-in-syntax/
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.