Mailinglisten-Archive |
Hi Ron,
> Hallo,
>
> Warning: Supplied argument is not a valid MySQL result resource in ...
>
> $result = mysql_query($query, $cid);
> if ($result==false) {
> print "Fehler in SQL-Query: $query";
> exit;
> }
> while ($row = mysql_fetch_row($result)) { // <== Hier solls sein!
> $ncols = mysql_num_fields($result);
> for ($i = 1; $i <= $ncols; $i++) {
> $qr[$zeile]["f".$i] = trim($row[$i-1]);
> }
> $zeile++;
> }
doch es ist tatsächlich ein Fehler in der Query.
Lösung zum Debuggen:
Entweder query ausgeben lassen und auf dem mysql-client mal testen.
oder phpMyAdmin verwenden.
oder
mysql_errno -- Returns the numerical value of the error message from
previous MySQL operation
mysql_error -- Returns the text of the error message from previous MySQL
operation
sind Deine Freunde
Grüße
Jochen
php::bar PHP Wiki - Listenarchive