i have this code.

function create_mysqltable($db_name,$table_name){
mysql_select_db($db_name);
 $sql_query = "CREATE TABLE IF NOT EXISTS $table_name "
 . "(  id tinyint(4) DEFAULT '0' NOT NULL AUTO_INCREMENT, "
 . "   soort char(20), "
 . "   aantal varchar(20) DEFAULT '0', "
 . "   str_men varchar(20) DEFAULT '0', "
 . "   recht varchar(20) DEFAULT '0', "
 . "   rechtverstek varchar(20) DEFAULT '0', "
 . "   verstekgelijk varchar(20) DEFAULT '0', "
 . "   verstekongelijk varchar(20) DEFAULT '0', "
 . "   PRIMARY KEY (id), "
 . "   UNIQUE id (id))";
 mysql_query($sql_query)
  or die (" cannot execute create query");
}

the following code repeats saying ERORR : cannot execute query.

if i delete the text IF NOT EXISTS al goes good.

I don't understand why.

Please help.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to