Jump to content

Archived

This topic is now archived and is closed to further replies.

WayneO

Create Table

Recommended Posts

When trying to run the following Mysql instruction

 

mysql_connect($db_host, $db_user, $db_pass)or die(mysql_error());

 

mysql_select_db ($db)or die(mysql_error());

 

mysql_query(\"CREATE TABLE tmp_balances (bal_id int(16) NOT NULL AUTO_INCREMENT,

UNIQUE bal_id(bal_id)) or die(mysql_error())\");

 

 

I receive the following Error

 

Table \'habladb.tmp_balances\' doesn\'t exist

 

 

It appears the CREATE TABLE is not functioning.

Anyone with an idea why ?

 

Wayne

Share this post


Link to post
Share on other sites

i think it\'s your code... try this:

 

mysql_query(\"CREATE TABLE tmp_balances(bal_id int(16) NOT NULL AUTO_INCREMENT, UNIQUE bal_id(bal_id))\") or die(mysql_error());

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.