After
I am trying to insert tables from phpmyadmin in SQL, such as:
adding users (steam VARCHAR (35) not NULL default ', name VARCHAR (32) No NULL default', length INT not NULL default 0, unrestricted VARCHAR (32 ) No NULL default '', Due to VARCHAR (64) No NULL default ', banned SMALLINT not NULL default 0, SMALLINT leaves no NULL D Default 0, primary key (steam));
but I am getting an error:
# 1064 - There is an error in your SQL syntax; 'VARCHAR (35) No NULL default', name VARCHAR (32) NULL default ', length' check
'matches the server version of the correct syntax that is used on line 3.
Am I doing wrong?
The value must be present in the database before entering it. So make sure that you are putting the value in the table that exists in your database.
To make a table you need to be active below given query.
CREATE TABLE users (steam VARCHAR (35) not NULL default ', name VARCHAR (32) NULL default', length INT not NULL default 0, unrestricted VARCHAR (32) No NULL default 'VARCHAR (64) No NULL default' ', but SMALLINT is not less than zero 0, SMALLINT does not leave zero zero 0, the primary key (steam);
After creating the table you can insert the value directly from phpmyadmin or you can do this by executing the following query Enter the user values in 'Steam Value', 'User Name', '4', 'Any Unmanaged Value', 'Reason for any reason', '0 ',' 0 ');
If you want to enter a value from a php file, you will need to create a database connection; After that you can use the mysql_query () function in the value in the DB
No comments:
Post a Comment