Jump to content

Update Mysql database, php error


crawlerbasher

Recommended Posts

I'm trying to update my database but keep getting this 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 ''Title' = 'Testing today', 'Story' = 'This' WHERE 'id' = ''' at line 1

 

I can't seem to find whats causing the problem.

 

This is the code.

 

				$id = $_POST['id'];
				$Story = $_POST['Story'];
				$Title = $_POST['Title'];

				mysql_query("UPDATE TaruNews SET 'Title' = '$Title', 'Story' = '$Story' WHERE 'id' = '$id'")or die(mysql_error());

Link to comment
https://forums.phpfreaks.com/topic/202326-update-mysql-database-php-error/
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.