Jump to content

mysql query


Piorun

Recommended Posts

Posted

I've got problem with this line:

  
mysql_query(handler, "CREATE TABLE tc_example(id INT NOT NULL AUTO_INCREMENT)" ) 
  

What i'm doing wrong???

P.S.

handler return true, but table is not creating... -.-

  • Moderators
Posted

If you want to set 'AUTO_INCREMENT' on a column, you have to set this column as a primary key:

mysql_query(handler, "CREATE TABLE tc_exemple (id INT NOT NULL AUTO_INCREMENT ,PRIMARY KEY ( id ))" ) 

If it don't work, maybe the handler is wrong or you don't have the sufficient rights to create the table.

The rEvolution is coming ...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...