Hello! I am working on a PHP project that works with databases. I recently got this error:
Table Creation Error: CREATE TABLE IF NOT EXISTS details ( title VARCHAR(255) NOT NULL, logo VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, ) ENGINE=INNODB;
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 ') ENGINE=INNODB' at line 5
This is my SQL command in PHP:
$sql = "CREATE TABLE IF NOT EXISTS details (
title VARCHAR(255) NOT NULL,
logo VARCHAR(255) NOT NULL,
description VARCHAR(255) NOT NULL,
) ENGINE=INNODB;";
What did I do wrong here? How can I fix the statement?
I got another error with that, I am going to try to create a SQL file with the sql code.
Just one more question, how can I log into mysql without user imput? (ie. I do not have to type anything in)