|
|
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo
|
|
Problem Shoutbox.php mysql_fetch_array () |
Autor |
Wiadomość |
mastah7991

Pomógł: 3 razy Posty: 65
|
Wysłany: 28-03-2013, 14:35 Problem Shoutbox.php mysql_fetch_array ()
|
|
|
Witam
problem z shoutbox.php
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/acespade/public_html/shoutbox.php on line 44
Kod: | $overlib = $shoutbox_config['rozkrz_overlib'];
$list = $shoutbox_config['rozkrz'];
$shouters_under = $shoutbox_config['rozkrz_l'];
$shouters_overlib = $shoutbox_config['rozkrz_l_o'];
if($list)
{
$sql = "SELECT COUNT(*) AS 'how_many', b.username, b.user_id, b.user_level, b.user_jr
FROM " . SHOUTBOX_TABLE . " a, " . USERS_TABLE . " b
WHERE b.user_id=a.sb_user_id
GROUP BY b.username, b.user_id, b.user_level, b.user_jr
ORDER BY how_many DESC
LIMIT $shouters_overlib";
$most_active = $db->sql_query($sql);
if($overlib)
{
$sql_2 = "SELECT COUNT(*) AS total FROM " . SHOUTBOX_TABLE;
$most_active_2 = $db->sql_query($sql_2);
$line_2 = mysql_fetch_array($most_active_2); $total = $line_2['total'];
}
$i=0;
while ($line = mysql_fetch_array($most_active))
{
$colored_username = color_username($line['user_level'], $line['user_jr'], $line['user_id'], $line['username']);
$line_user_name = $colored_username[0];
if($overlib)
{
$i++;
$percent = floor(($line['how_many']/$total)*100).'%';
$who_overlib = '<span class=row2' . $colored_username[1] . '>' . $line_user_name . '</span>';
$who_overlib = str_replace("\"", "", $who_overlib);
if ($i%2!=0) $show_1 = '<tr><td align=center class=row1>' . $i . '. </td><td align=center class=row1>' . $who_overlib . '</td><td align=center class=row1>' . $line['how_many'] . '</td><td align=center class=row1>' . $percent . '</td></tr>';
else $show_1 = '<tr><td align=center class=row2>' . $i . '. </td><td align=center class=row2>' . $who_overlib . '</td><td align=center class=row2>' . $line['how_many'] . '</td><td align=center class=row2>' . $percent . '</td></tr>';
$show .= $show_1;
$overlib_show = '<span onMouseOver="return overlib(\'<left><table cellspacing=2 cellpadding=4 width=100%><tr><td align=center class=cat><b>#</b></td><td align=center class=cat><b>' . $lang['User'] . '</b></td><td align=center class=cat><b>' . $lang['msg_cnt'] . '</b></td><td align=center class=cat><b>' . $lang['msg_percent'] . '</b></td></tr>' . $show . '</table></left>\', ol_width=400, ol_offsetx=10, ol_offsety=10, ABOVE, CAPTION, \'<center>' . $lang['Shouters'] . '</center>\')" onMouseOut="nd();" style="cursor: pointer">' . $lang['Shouters'] . (($list) ? ': ' : '') . '</span> ';
}
if($list && $shouters_under>0)
{
$who = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $line['user_id']) . '" target="_blank" class="gensmall"' . $colored_username[1] . '>' . $line_user_name . '</a>';
$how_many = '(' . $line['how_many'] . ')';
$template->assign_block_vars('mostactive', array(
'WHO' => $who,
'HOW_MANY' => $how_many)
);
}
$shouters_under--;
}
} |
Linia 44
Kod: | while ($line = mysql_fetch_array($most_active)) |
Jedyne co zauważyłem to to że nie ma rozkrzyczanych przez to ;/
strona AceSpades.pl |
|
|
|
 |
Gadatliwa Kasia
|
|
|
|
Woytec

Pomógł: 2596 razy Posty: 7676
|
Wysłany: 28-03-2013, 19:56
|
|
|
Czy wykonałeś zapytania sql z modyfikacji?
Popraw adres forum w profilu |
|
|
|
 |
mastah7991

Pomógł: 3 razy Posty: 65
|
Wysłany: 29-03-2013, 00:24
|
|
|
tak problem polega ze to 3 forum gdzie instaluje tego sb i tu nie dziala ( problem tylko w rozkrzyczanych) |
|
|
|
 |
Woytec

Pomógł: 2596 razy Posty: 7676
|
Wysłany: 29-03-2013, 09:34
|
|
|
A w ustawieniach rozkrzyczanych wszystko dobrze? |
|
|
|
 |
mastah7991

Pomógł: 3 razy Posty: 65
|
Wysłany: 29-03-2013, 22:57
|
|
|
właśnie nie ;/ nic nie dało się robić
ogólnie ss nie dam bo del cała ten kod co pisałem UP bo z errorem głupio się pokazywać ;/ |
|
|
|
 |
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum
|
Dodaj temat do Ulubionych Wersja do druku
|
Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!
Powered by phpBB modified by Przemo © 2003 phpBB
| Strona wygenerowana w 0,06 sekundy. Zapytań do SQL: 11 | |
 |
|