wenn ich die folgenden sql abfrage per php ausführe bekomme ich die fehlermeldung
sql queryWarning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in G:\htdocs\orion\includes\topsite_ranking.php on line 102
Code: Alles auswählen
SELECT * FROM orion_topsite_sites sites, orion_topsite_stats stats
WHERE sites.id = stats.id
AND active = 1
ORDER BY
(unq_pv_0_daily +
unq_pv_1_daily +
unq_pv_2_daily +
unq_pv_3_daily +
unq_pv_4_daily +
unq_pv_5_daily +
unq_pv_6_daily +
unq_pv_7_daily +
unq_pv_8_daily +
unq_pv_9_daily + 0) / 10
DESC LIMIT 0, 10die weiterverarbeitung des query ist wie folgt :
Code: Alles auswählen
$sql = "SELECT * FROM "
. $table_prefix . "topsite_sites sites, "
. $table_prefix . "topsite_stats stats
WHERE sites.id = stats.id AND active = 1 $sql_cat
ORDER BY $rank_by DESC
LIMIT " . $start . ", " . $config['num_list'];
if (!( $result = $db -> sql_query($sql) ) ) {
message_die (GENERAL_ERROR, 'Could not query data', '', __LINE__, __FILE__, $sql);
}
$result = mysql_query($sql);
$count = mysql_num_rows($result);
$rank = $start;
while ( $row = $db -> mysql_fetchrow($result) ) { // <-- diese zeile verursacht den fehler
$rank = $rank + 1;
Scheint so als könne man keine SQL Anweisung in einer Schleife die SQL Daten verarbeitet einsetzten
für hilfe währe ich dankbar
Gruss
Martin