Mailinglisten-Archive |
Erik Bender wrote:
> Ich verzweifle gerade an einer simplen SELECT Abfrage, wie ich sie schon
> 100x gemacht habe. Aber irgendwie bin ich blind.
>
> <?
> include ("_config.inc.php");
> $query = "select * from tabelle where id=".$id." and
> passwort=".$passwort." order by id desc limit 0,1";
> $result = mysql_query ($query);
>
warum so unleserlich?
$query = "select * from tabelle where id='$id' and passwort='$passwort'
order by id desc limit 0,1" geht ebenso ;-)
und da siehst du auch die lösung, das müsste id='$id' statt id=$id heissen
hoffe das hilft
Matthias
php::bar PHP Wiki - Listenarchive