Quote:
Originally Posted by jackicola
Wenn du eh nur "style" abfragst, versuch es mal so:
Code:
$query1 = mysql_query("SELECT `style` FROM `styles` WHERE id '1'");
Das LIKE ist unnötig.
Wenn "id" ein int ist dann so:
Code:
$query1 = mysql_query("SELECT `style` FROM `styles` WHERE id 1);
So jetzt noch $query auswerten und ausgeben:
Code:
$ergebnis = mysql_fetch_object($query);
echo "Ergebnis: ".$ergebnis->style;
Hoffe das konnte deine Frage beantworten.
PS: Die ` sind gewollt..
|
Estmal Dankeschön!
Wenn ich es so mache:
Code:
$query1 = mysql_query("SELECT `style` FROM `styles` WHERE id 1);
Dann kommt:
Parse error: syntax error, unexpected T_STRING in /www/zxq.net/t/e/s/test5678/htdocs/inc/grund.php on line 14
und bei:
Code:
$query1 = mysql_query("SELECT `style` FROM `styles` WHERE id '1'");
kommt:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/zxq.net/t/e/s/test5678/htdocs/inc/grund.php on line 12
Ergebnis:
Und es funktioniert! Danke!
Ist da jetzt noch ein Fehler bzw. wie bekomme ich jetzt noch die Warnung weg?
EDIT: Noch ein Fehler gefunden:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /www/zxq.net/t/e/s/test5678/htdocs/logs.php on line 35
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/zxq.net/t/e/s/test5678/htdocs/logs.php on line 40
Datei hab ich mal hochgeladen:
Edit: Und noch ein kleiner Fehler

:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/zxq.net/t/e/s/test5678/htdocs/styles.php on line 16
Datei:
Bitte nochmal helfen