0
INSERT INTO event reservation VALUES (3104, "2113", "1004", "2019/11/21", "5:00 PM", "2019/10/21", "250");

#1064 - 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 'reservation VALUES (3104, "2113", "1004", "2019/11/21", "5:00 PM", "2019/10/2...' at line 1 pls help

aynber
  • 22,380
  • 8
  • 50
  • 63
  • Table names should not have spaces. If you do have a space, then you need to surround the table name with ticks – aynber Jun 21 '21 at 15:59
  • Side note: Don't get used to use double quotes for string or date literals. Yes, sadly MySQL accepts that, but in SQL double quotes are usually for identifiers, such as column names. Should you ever use another DBMS (or future MySQL versions become more sane about this) you'll likely get an "invalid object name" error. Always use single quotes for string or date literals. – sticky bit Jun 21 '21 at 16:01
  • 1
    Actually, to avoid quoting issues *for values*, you should be using prepared statements and parameter binding. Here are the instructions for [PDO](https://secure.php.net/manual/en/pdo.prepared-statements.php) and [mysqli](http://php.net/manual/en/mysqli.quickstart.prepared-statements.php) – aynber Jun 21 '21 at 16:06

0 Answers0