Jump to content


Create Table

  • Please log in to reply
1 reply to this topic

#1 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 ?


#2 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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users