Jump to content

[SOLVED] mysql error?


forumnz

Recommended Posts

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, date, due_date, inv_number, ref, tax_incl) VALUES ('e878dca5c96oa38a815cf915' at line 1

 

And this is the code:

<?php
mysql_query("INSERT INTO table (hash_key, inv_key, to, date, due_date, inv_number, ref, tax_incl) VALUES ('$hk', '$ik', '$to', '$date', '$due', '$inv_num', '$ref', '$tax')")or die(mysql_error());
?>

 

What's wrong with it?

Thanks :D

Link to comment
https://forums.phpfreaks.com/topic/156621-solved-mysql-error/
Share on other sites

im sure this wont make much of a diff...but try....

<?php
mysql_query("INSERT INTO table (`hash_key`, `inv_key`, `to`, `date`, `due_date`, `inv_number`, `ref`, `tax_incl`) VALUES ('$hk', '$ik', '$to', '$date', '$due', '$inv_num', '$ref', '$tax')") or die(mysql_error());
?>

 

 

and your sure that your the table is named table, and it has the columns named: hash_key, inv_key, to, date, due_date, inv_number, ref, tax_incl ?

Link to comment
https://forums.phpfreaks.com/topic/156621-solved-mysql-error/#findComment-824703
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.