Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

MySQL error

$
0
0

This is my php code

	if(mysqli_query($con,"INSERT INTO transactions (ID, Amount, To, From, Description, Type) VALUES ('23', '46', 'hello', 'hello', 'hell1', 'asddsa')")) {
		return "success";
	}
	echo mysqli_error($con);

I get 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 'To, From, Description, Type) VALUES ('23', '46', 'hello', 'hello', 'hell1', 'asd' at line 1

What am i doing wrong?

 


Viewing all articles
Browse latest Browse all 13200

Trending Articles