i have this code but it cant work in my hosting
usualy the error is :
The following errors were reported:
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 ''comments' ( 'id' int (4) NOT NULL auto_increment, 'name' varchar (65) NOT NUL' at line 1

ths is my code :

CREATE TABLE 'comments' (
'id' int(4) NOT NULL auto_increment,
'name' varchar(65) NOT NULL default,
'email' varchar(100) NOT NUL,
'comment' longtext NOT NULL,
'datetime' varchar(65) NOT NULL,
CHARSET = Larin 1

Check this web page out. It has really good examples of how to create a database with fields. Then i would use PHPMYADMIN to make it auto increment.


Your missing the second l in null

'email' varchar(100) NOT NUL,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.