profile views today

Started on the old forum in July 2009 · view the original in the archive · old links redirect here

28 replies · 1,675 views · started 17 years ago · 1 min read

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.

11 participants
Pablo Developer · 164 posts #21

here is a example on what am talking

Profile views: 44

Profile Views Today: 9

joseg Junior · 34 posts #22

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

Pablo Developer · 164 posts #23

the value is stuck at 0

sklbd Junior · 47 posts #24

/////////////////////////////////////// 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

sklbd Junior · 47 posts #25

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

Pablo Developer · 164 posts #27

still not the code am looking for

sklbd Junior · 47 posts #28

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

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close