Database layout:
rid (auto increment) (primary key) (255)
song (varchar) (120)
artist (varchar) (30)
by(varchar) (33)
key(varchar) (60)
PHP code:
$sql = "INSERT INTO Requests (song,artist,by,key)
VALUES ('$song','$artist','$by','$key')";
if($this->db->query($sql))
{
die("true");
}
echo 'false: ' . $this->db->error;
Error:
false: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'by,key) VALUES ('testsong','testing','kyle','example')' at line 1
Help? I have debuged for ages, I can't see whats wrong with that SQL? Thanks in advance!