error on list

Started on the old forum in August 2012 · view the original in the archive · old links redirect here

4 replies · 415 views · started 14 years ago · 1 min read

2 participants
ozziemale31 Lead · 861 posts #1

ok now i have another bug lol sos loony if yer reading this post lol heres whats hapening now user whos viewd is updated in the forum_latest list but only shows the one nick


Whos Viewd The File rampage


my code is as follows

 
$tid = $_GET["tid"];
  echo "Whos Viewd The File<br />";
     $dnt = mysql_fetch_array(mysql_query("SELECT name, tid FROM forum_latest WHERE tid='".$tid."'"));

         echo "$dnt[0]"; 

my tables are

      forum_latest
    id 	name 	pid 	tid 	uid
7 	rampage 0 	30 	0
8 	test 	0 	30 	0
9 	test 	0 	30 	0
10 	rampage 0 	25 	0 

now the link to the whosviewed list is

forums.php?mzonez=whosviewed&&tid=$post[0] it would be nice to get this list to work properly as it will complete the final part of my forums for file attachments

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

asifnayem Developer · 119 posts #2
$tid = $_GET["tid"]; 
echo "Whos Viewd The File<br />"; 
$result = mysql_query("SELECT name, tid FROM forum_latest WHERE tid='".$tid."'");
while ($row = mysql_fetch_array($result)) {
echo $row[1];
}
ozziemale31 Lead · 861 posts #3

re

asifnayem wrote:

$tid = $_GET["tid"]; 
echo "Whos Viewd The File<br />"; 
$result = mysql_query("SELECT name, tid FROM forum_latest WHERE tid='".$tid."'");
while ($row = mysql_fetch_array($result)) {
echo $row[1];
}

that code works but returns back a number

Whos Viewd The File 25

      Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	7 	rampage 	0 	30 	0
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	8 	test 	0 	30 	0
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	9 	test 	0 	30 	0
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	10 	rampage 	0 	25 	0

Added after 26 minutes:

i think i got it to work its in test mode at the moments

Whos Viewd The File rampage, test, test,

where in the tables

Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	7 	rampage 	0 	30 	0
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	8 	test 	         0 	30 	0
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	9 	test 	         0 	30 	0
Edit Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	10 	rampage 	0 	25 	0

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

asifnayem Developer · 119 posts #4

ozziemale31 wrote: that code works but returns back a number

Whos Viewd The File 25

      Edit 	Edit Inline Edit 	Copy Copy 	Delete Delete 	7 	rampage 	0 	30 	0

Edit Edit Edit Inline Edit Copy Copy Delete Delete 8 test 0 30 0 Edit Edit Edit Inline Edit Copy Copy Delete Delete 9 test 0 30 0 Edit Edit Edit Inline Edit Copy Copy Delete Delete 10 rampage 0 25 0

Added after 26 minutes:

i think i got it to work its in test mode at the moments

Whos Viewd The File rampage, test, test,

where in the tables

Edit Edit Edit Inline Edit Copy Copy Delete Delete 7 rampage 0 30 0 Edit Edit Edit Inline Edit Copy Copy Delete Delete 8 test 0 30 0 Edit Edit Edit Inline Edit Copy Copy Delete Delete 9 test 0 30 0 Edit Edit Edit Inline Edit Copy Copy Delete Delete 10 rampage 0 25 0

This would do it. I didn't saw that $row[1], i put this based on your db table. but eventually realized that name is the first to serve in your query. thats why put [1]. it would be $row[0].

$tid = $_GET["tid"];  
echo "Whos Viewd The File<br />";  
$result = mysql_query("SELECT name, tid FROM forum_latest WHERE tid='".$tid."'"); 
while ($row = mysql_fetch_array($result)) { 
echo "$row[0], "; 
} 
ozziemale31 Lead · 861 posts #5

re

yep i tried it like that it works fine on the ofline server with wammp but when i put it online i get some display errors becus i included session() to get the id so i think ill look at recoding the down2.php page so the error should disappear

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

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