profile views today
Started on the old forum in July 2009 · view the original in the archive · old links redirect here
TL;DR · summary of 28 replies
- Pablo is looking for code that shows how many profile views a person has had today.
- The thread suggests using SQL queries to fetch data from a database, but the provided code does not work as expected and still displays "0" for profile views.
- A solution was proposed by sklbd: creating a new database table for lastview with appropriate SQL insert and select statements.
- Pablo needs a code snippet that shows total profile views today in a format like "Total Profile Views Today: 450".
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
Brot in the scritp for views today using in the sql consult ("SELECT wathever FROM proviews WHERE id='".$who."' AND time='".$time24."'")
and
("INSERT INTO wathever='".$wathever."', time='".time()."' SET proviews WHERE id='".$who."'")
make the variable $tm24 = time() - (246060);
add in sql prowiews or watheve the line time varchan 100 not nule
/////////////////////////////////////// 10 viewers
else if($action=="skl10") { addonline(getuid_sid($sid),"Viewing Last 10 profileviewers",""); if($who==""||$who==0) { $mnick = $_POST["mnick"]; $who = getuid_nick($mnick); } $whonick = getnick_uid($who);
echo "<card id="main" title="Viewing Last 10 profileviewers">";
echo "
";
$sql= mysql_query("SELECT skl10lastview,ltime FROM skl10lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 10");
while($row = mysql_fetch_array($sql))
{
$a = getuid_nick($row[0]);
echo "<a href="index.php?action=viewuser&sid=$sid&who=$a">$row[0]</a>";
$newtime =$row[1]+(0 *60 *60);
echo " ".date("D d M y - h:i:s a",$newtime)."
";
echo "
";
}
$a = getuid_nick($whonick);
echo "back to <a href="index.php?action=viewuser&sid=$sid&who=$a">$whonick</a>'s profile
";
echo "<a href="index.php?action=main&sid=$sid">Home</a>";
echo "
";
echo "</card>";
}
ShaK!L AhammeD
Sklifbd.CoM +88-01730039272
u have also need a new data base table for lastview
and put this code to user profile $sql = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM skl10lastview WHERE whonick='".$whonick."'")); if ($sql[0]>10) { $sql = mysql_fetch_array(mysql_query("SELECT MAX(id) FROM skl10lastview WHERE whonick='".$whonick."'")); $sql = $sql[0]-9; mysql_query("DELETE FROM skl10lastview WHERE whonick='".$whonick."' AND id <'".$sql."'"); } $lv=getnick_sid($sid); $a = getuid_nick($whonick); if($a!=$uid) { mysql_query("INSERT INTO lastview SET skl10lastview='".$lv."', whonick='".$whonick."', ltime='".time()."'"); } $sql= mysql_fetch_array(mysql_query("SELECT skl10lastview,ltime FROM skl10lastview WHERE whonick='".$whonick."'ORDER BY ltime DESC LIMIT 1")); $a = getuid_nick($sql[0]); $link = "<a href="index.php?action=viewuser&sid=$sid&who=$a">$sql[0]</a>"; echo "last viewed by $link -"; echo "<a href="index.php?action=skl10&who=$who&sid=$sid">View</a> ";
ShaK!L AhammeD
Sklifbd.CoM +88-01730039272
Thanks, just give it a trial
http://myfacepals.com MYFACEPALS SOCIAL NETWORKExternal image (may be gone)
Pablo. wait do u want the code like
total profile view :: 450 today profile view :: 10
like this?????????? so wait i will give u
ShaK!L AhammeD
Sklifbd.CoM +88-01730039272
go look for wap.net.ph script working ...u need to do it to sceate sql or alter table for it
com site: http://vampist.net download site: http://wapdloads.net fb: http://www.facebook.com/pmplx