phpbar.de logo

Mailinglisten-Archive

[php] mySQL Query Fehler

[php] mySQL Query Fehler

php_(at)_phpcenter.de php_(at)_phpcenter.de
Tue, 3 Apr 2001 13:36:39 +0200


Hallo,

Ich habe folgendes Problem, und zwar lese ich zuerst mit einem Skript
eine Datei mysql.tables aus, und will dann den Text aus dieser Datei als
Query absenden.

Auszug aus dem Skript:
$mysql_file =3D file("mysql.tables");
$mysql_tables =3D implode("", $mysql_file);

$query =3D mysql_query($mysql_tables);

echo mysql_errno().": ".mysql_error()."<BR>";

Auszug aus mysql.tables:
#
# Table structure for table 'm_config'
#

CREATE TABLE m_config (
  name text NOT NULL,
  value text NOT NULL
) TYPE=3DMyISAM;

#
# Dumping data for table 'm_config'
#

INSERT INTO m_config values ('debug','0');
INSERT INTO m_config values ('hack_wait','1');

#
# Table structure for table 'm_forums'
#


Wenn ich jetzt allerdings diesen Text als Query absende, bekomme ich
folgenden Fehler "1064: You have an error in your SQL syntax near ';".
Was mache ich falsch, wenn ich den Query in phpMyAdmin ausf=FChre =
l=E4uft
alles einwandfrei, also liegt es vermutlich an einem Fehler in meinem
Code... Hilfe!!!

Naja, Gru=DF,
Matthias Otterbach



php::bar PHP Wiki   -   Listenarchive