why my CREATE TABLE command isn't working
in the previous parts of this code not posted I connect to the database and each previous command has an 'or die ('sampletext')' thing with it and all the other parts are not throwing any errors, it just keeps stopping at 'unsuccessful query'.. I am using XAMPP.. what am I doing wrong?
$query="CREATE TABLE fback_input (entry bigint(20) NOT NULL auto_increment,Yes bigint(20) NOT NULL,
No varchar(20) NOT NULL,Sortof bigint(20) NOT NULL,Response varchar(20) NOT NULL)";
@mysql_query($query) or die ('unsuccessful query');
CREATE TABLE testInfo (
testNo integer PRIMARY KEY,
CREATE TABLE products (
product_no integer PRIMARY KEY,
May be database name is wrong, i watch above quires it is quite well.
Check first database connection query, and then start the update query.
Make sure the DB user you are connecting with has the necessary create permission(s).
Also, maybe you could output mysql_error() as part of your debug info -- either in the die() or before it in an error_log().
First try to execute query on database then try it in php. And check the database connection.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)