help needed 4 cz

Started on the old forum in February 2010 · view the original in the archive · old links redirect here

6 replies · 439 views · started 16 years ago · 1 min read

2 participants
khan Lead · 681 posts #1

frienZ, i saw some site have enter left show page.it means when some 1 enters n rum, it sayz username enters at time.same in lefting d rum. can ny 1 help me out to code this out?

khan Lead · 681 posts #2

temorary i do this by get function like if $GET_[ent==hi] {@mysql.......} but if anyone press f5 or refresh the page constantly, the rum got flooded. plz can ny one help me?

djlee Developer · 224 posts #4

add in a check, either a multi check that checks for the last message being "user enters room" or a timed check something like

$r = mysql_query("SELECT COUNT(id) from chat WHERE sent > ".(time()-60)." AND txt = 'user enters room');
$c = mysql_result($r,0);
if($c == 0)
 //=== add the enter announce query here

not the best way to do it, but based on what ive seen of the chatroom sql and code on here your not gonna get a perfect solution, it would be better if you assigned the enter txt to the user that way you could just select the users last message and do a check on it

djlee Developer · 224 posts #6

it not gonna work, its theory code, i assume you took the "theory work" and coded it to work with your source, your database and your table columns

khan Lead · 681 posts #7

yap thanks for theory; i did it with ma own way like $r = mysql_query("SELECT COUNT(id) from chat WHERE time > ". (time()-60)." AND msg = '$user enters room'); $c = mysql_result($r,0); if($c == 0 && $GET_[ent == hi]) @mysql_query............. Thanks.

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