Jump to content


Photo

Create Table


  • Please log in to reply
1 reply to this topic

#1 WayneO

WayneO
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 15 February 2003 - 07:00 PM

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

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 16 February 2003 - 01:32 AM

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());
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users