Re: [PHP] some help needed building chat-app

2003-03-06 Thread Marek Kilimajer
n and printing it to the end. like - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Michiel van Heusden" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2003 12:52 PM Subject: Re: [PHP] some help

Re: [PHP] some help needed building chat-app

2003-03-06 Thread Marek Kilimajer
nks anyway - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Michiel van Heusden" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2003 11:00 AM Subject: Re: [PHP] some help needed building chat-app If you mean ma

Re: [PHP] some help needed building chat-app

2003-03-06 Thread Marek Kilimajer
If you mean making the client refresh the page after an amount of time, use header('Refresh: 10'); it is in seconds Michiel van Heusden wrote: thanks for your replies the other thing i was trying to ask :) is how to keep on looping and looking for new messages is just a plain loop ok or should i

Re: [PHP] some help needed building chat-app

2003-03-05 Thread Michiel van Heusden
thanks for your replies the other thing i was trying to ask :) is how to keep on looping and looking for new messages is just a plain loop ok or should i use a timer or whatsoever, i have no clue right now it's a bit like $x = "loop"; do while ($x == "loop") { //mysql_query (select new messages

Re: [PHP] some help needed building chat-app

2003-03-05 Thread Clete Rivers Blackwell 2
Yes, it does, so no need, but if you really want to be picky, use mysql_close([resource link_identifier])... "Joseph Bannon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > * how can i make sure the db-connection is closed > > before the user closes the window? > > > Doesn't the c

Re: [PHP] some help needed building chat-app

2003-03-05 Thread Joseph Bannon
> * how can i make sure the db-connection is closed > before the user closes the window? Doesn't the connection close when the php script stops? J. __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ --

Re: [PHP] some help needed building chat-app

2003-03-05 Thread Marek Kilimajer
You need only one query with LIMIT, example: //this will select last 10 messages $res=mysq_query('SELECT * FROM chat_messages ORDER BY addtime DESC LIMIT 10'); // this will print them from newer to older while($message=mysql_fetch_array($res)) { echo $message['from'].': '.$message[message'].''