hi,
i got a small problem while executing a sql statement.
my code is:
$filename = "sql_create.txt";
$file = fopen($filename,"r");
$str = "";
while (!feof($file))
$str .= fgets($file, 512);
fclose($file);
mysql_query($str ,$db) or die ("ERROR");
and the text file looks like this
DROP TABLE IF EXISTS xref_system_design;
CREATE TABLE xref_system_design (
design_id int(4) unsigned NOT NULL default '0',
system_id int(4) unsigned NOT NULL default '0',
name varchar(20) default NULL
) TYPE=MyISAM COMMENT='Zuordnung Design zu Name';
--------------------------------------------------------
the database connection is alright and when i copy the statement into phpmysql it works fine.
but not in the php-page
what's wrong?