Hi,
I am trying to create a MySQL table with a primary key field. I have a create table statement that looks like this:
$sql = "CREATE TABLE Test
(
id int NOT NULL AUTO_INCREMENT,
individual varchar(100),
primary_contact varchar(100)
)";
but then I get this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /nfs/www/WWW_pages/lunny/drakesbayoyster.com/howtohelp/create_table_endorsements_test.php on line 42
Is the AUTO_INCREMENT function supported? It seems like a standard feature of MySQL tables. When I leave out the AUTO_INCREMENT part, the table is created just fine.
Thanks!
Jonathan
I am trying to create a MySQL table with a primary key field. I have a create table statement that looks like this:
$sql = "CREATE TABLE Test
(
id int NOT NULL AUTO_INCREMENT,
individual varchar(100),
primary_contact varchar(100)
)";
but then I get this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /nfs/www/WWW_pages/lunny/drakesbayoyster.com/howtohelp/create_table_endorsements_test.php on line 42
Is the AUTO_INCREMENT function supported? It seems like a standard feature of MySQL tables. When I leave out the AUTO_INCREMENT part, the table is created just fine.
Thanks!
Jonathan