Hallo,
das Problem liegt an einer Simplen Abfrage wo ich schon seit gestern per Google usw.. und durch Probieren nach der Lösung suche:
Ausgabe:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= Administrator' at line 4
SELECT * FROM sendeplan WHERE mod = Administrator
Ausgabe:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '="Administrator"' at line 1
SELECT * FROM sendeplan WHERE mod="Administrator"
Dieses war der erste Versuch:
Ausgabe:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 'Administrator'' at line 4
SELECT * FROM sendeplan WHERE mod = 'Administrator'
das was mich dran Wundert im Moment: in einer anderen Datei des Scripts verwende ich dieses und es funktioniert wie es soll:
das Problem liegt an einer Simplen Abfrage wo ich schon seit gestern per Google usw.. und durch Probieren nach der Lösung suche:
PHP-Code:
$sql = "SELECT *
FROM sendeplan
WHERE
mod = $mod
";
$result = mysql_query($sql);
echo mysql_error();
echo "<br/>".$sql;
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= Administrator' at line 4
SELECT * FROM sendeplan WHERE mod = Administrator
PHP-Code:
$sql = 'SELECT * FROM sendeplan WHERE mod="'.$mod.'"';
$result = mysql_query($sql);
echo mysql_error();
echo "<br/>".$sql;
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '="Administrator"' at line 1
SELECT * FROM sendeplan WHERE mod="Administrator"
Dieses war der erste Versuch:
PHP-Code:
$sql = "SELECT *
FROM sendeplan
WHERE
mod = '$mod'
";
$result = mysql_query($sql);
echo mysql_error();
echo "<br/>".$sql;
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 'Administrator'' at line 4
SELECT * FROM sendeplan WHERE mod = 'Administrator'
das was mich dran Wundert im Moment: in einer anderen Datei des Scripts verwende ich dieses und es funktioniert wie es soll:
PHP-Code:
$sql = "SELECT *
FROM sendeplan
WHERE
start = '$stamp'
";
$result = mysql_query($sql);
echo mysql_error();
Kommentar