has any one got ramdom galley coding please one that works please i am after it for my site toptunes i looked on ere and tryed over ome and not one of them works so if you could helo i would be very greatful
Random Galley For Index Page
Collapse
This topic is closed.
X
X
-
try this and max2.phpCode:$sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); //$simbol = getsimbol($who); $no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'")); //$xp = "$simbol$user($no[0] pics)"; $xp = "$user($no[0] pics)"; $ionutxp = $item[1]; echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/> "; } }Attached FilesHate romains that take codes from here and tell to all that they had made that

-
<div class='quotetop'>QUOTE (ionutxp @ Nov 20 2008, 05:12 AM) <{POST_SNAPBACK}></div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1";<div class='codetop'>CODE
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$who = $item[0];
$user=getnick_uid($who);
//$simbol = getsimbol($who);
$no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'"));
//$xp = "$simbol$user($no[0] pics)";
$xp = "$user($no[0] pics)";
$ionutxp = $item[1];
echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/>
";
}
}</div> try this and max2.php[/b][/quote]
tryed it dont work
Comment
-
<div class='quotetop'>QUOTE (ionutxp @ Nov 21 2008, 06:05 AM) <{POST_SNAPBACK}></div>i'm not getting errors it not showing any thing at allw have errors ?[/b]
Comment
-
LOL check ur ibwf_gallery table it might imageurl or imagescr ... Try to use this other way $randomm = mysql_fetch_array(mysql_query("SELECT itemurl, uid FROM baz_gallery WHERE id ORDER BY RAND() LIMIT 1"));
echo "<img src=\"$randomm[0]\" height=\"40\" width=\"40\" alt=\"$randomm[1]\"/>"; change the table..
Comment
-
<div class='quotetop'>QUOTE (marwin29 @ Nov 22 2008, 02:21 AM) <{POST_SNAPBACK}></div><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1";LOL check ur ibwf_gallery table it might imageurl or imagescr ... Try to use this other way $randomm = mysql_fetch_array(mysql_query("SELECT itemurl, uid FROM baz_gallery WHERE id ORDER BY RAND() LIMIT 1"));
echo "<img src=\"$randomm[0]\" height=\"40\" width=\"40\" alt=\"$randomm[1]\"/>"; change the table..[/b]
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$who = $item[0];
$user=getnick_uid($who);
$simbol = getsimbol($who);
$no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'"));
$xp = "$simbol$user($no[0] pics)";
$xp = "$user($no[0] pics)";
$ionutxp = $item[1];
echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/>
";
}
}</div> can some one sort this out so i can use it on my site please
some one help please my site dont use ibwf_gallery
Comment
-
<div class='quotetop'>QUOTE (djsammy @ Nov 22 2008, 04:20 AM) <{POST_SNAPBACK}></div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1";<div class='codetop'>CODE
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$who = $item[0];
$user=getnick_uid($who);
$simbol = getsimbol($who);
$no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'"));
$xp = "$simbol$user($no[0] pics)";
$xp = "$user($no[0] pics)";
$ionutxp = $item[1];
echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/>
";
}
}</div> can some one sort this out so i can use it on my site please
some one help please my site dont use ibwf_gallery[/b][/quote]
then what do you use instead ibwf_gallery ?キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
Comment
-
<div class='quotetop'>QUOTE (metulj @ Nov 22 2008, 05:39 AM) <{POST_SNAPBACK}></div>its in the script some please helpthen what do you use instead ibwf_gallery ?[/b]
Comment
-
<div class='quotetop'>QUOTE (ionutxp @ Nov 22 2008, 03:06 PM) <{POST_SNAPBACK}></div>sent u inboxur crazy ..:| post ur sql ....u want 2 much ...but u dont ofer infos[/b]
Comment
-
<div class='quotetop'>QUOTE (djsammy @ Nov 22 2008, 04:23 PM) <{POST_SNAPBACK}></div>inbox?sent u inbox[/b]
then you dont need this topic
so.. CLOSEDキノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
Comment
Comment