I got the following error which was wasn't expect with the original code
Code: Select all
Error: mysql_fetch_assoc() expects parameter 1 to be resource, object given
Error in ../modules/stats/auto_post_content.php
Line 32
Error in ..\modules\stats\auto_post_content.php
Line 32
Code: Select all
echo "<span class='userBox' onclick=\"document.location='index.php?p=view_player&id=$userId'\">$username [$userId]</span>";
$search = $db->Execute("select user_stats.*,user_stat_types.*
from user_stats
left join user_stat_types
on user_stat_types.id=user_stats.stat_type where user_id = ? Order by id DESC", $userId);
if ($search->EOF)
while ($row = mysql_fetch_assoc($search)) {
echo $row[1][5];
}
$search->Close();
Code: Select all
while ($row = mysql_fetch_assoc($search)) {
Thanks in advance