how would i change the last 10 views to just 5?
lol sori i got it hehehe
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
Started on the old forum in March 2008 · view the original in the archive · old links redirect here
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
how would i change the last 10 views to just 5?
lol sori i got it hehehe
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
downloaded last 10 profile viewers script and changed table name to ibwf_lastview , before it was only lastview in sql table just need to know do i have to change sql query insert into ibwf_lastview FROM command is getting table ibwf_lastview INSERT command is inserting in field of table ibwf_lastview is it ? just need to know how to viw last 10 users or is it necessary to complete 10 than only i be able to view
CODE
$lv=getnick_sid($sid); mysql_query("INSERT INTO lastview SET lastview='".$lv."', whonick='".$whonick."', ltime='".time()."'"); $sql= mysql_query("SELECT lastview,ltime FROM ibwf_lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC"); $counter=0; while($row = mysql_fetch_array($sql)){ if($counter<10){ echo "Last viewed by $row[0] "; $newtime =$row[1]+(6 *60 *60); echo "".date("D d M y - H:i:s a",$newtime)." "; echo "------------ "; $counter++; } }
this is a bad coding which may use many server ressources,
try this:
$lv=getnick_sid($sid);
mysql_query("INSERT INTO lastview SET lastview='".$lv."', whonick='".$whonick."', ltime='".time()."'");
$sql= mysql_query("SELECT lastview,ltime FROM ibwf_lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 10");
$counter=0;
while($row = mysql_fetch_array($sql)){
echo "Last viewed by $row[0] ";
$newtime =$row[1]+(6 *60 *60);
echo "[b]".date("D d M y - H:i:s a",$newtime)."[/b]
";
echo "------------
";
}
Advertise your mobile site for FREE with AdTwirl
time in last 10 views giving error, it do not match the server External image (may be gone)
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
how to add this in lists.php? and also how to correct the time?
Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!
$sqlthing = mysql_query("SELECT * FROM last WHERE username='$name'");
$dt=(mysql_result($sqlthing,0,"date"));
$by=(mysql_result($sqlthing,0,"who"));
//echo "
Profile Last Viewed At
$dt";
echo "
Ultima visita profilo di: $by
";
$sql2 = "UPDATE last SET who='$username' WHERE username='$name'";
$result2 = mysql_query($sql2);
$dt = date('Y-m-d H:i:s');
$sql = "SELECT * FROM last where username='$name'";
$result = mysql_query($sql);
$number_of_rows = mysql_num_rows($result);
if ($number_of_rows=="1")
{
$sql = "UPDATE last SET date='$dt' WHERE username='$name'";
$result = mysql_query($sql);
}
if ($number_of_rows=="0")
{
$dt = date('Y-m-d H:i:s');
$sql11 = "INSERT INTO last (username,date,who) VALUES
('$name','$dt','$username')";
$result11 = mysql_query($sql11);
}
this not work at my wapdesire script...any1 can help to fix??!!
if like my post click: