Re: [PHP] Counting Views on records in DB!

2001-12-21 Thread Bas Jobsen

UPDATE $table views=views+1


Op vrijdag 21 december 2001 21:38, schreef Thomas Edison Jr.:
 Hi,
 I was just going through some Message Board system and
 noticed that there is a Views column which gives how
 many times the Message has been viewed.

 I created a similar message board, where Messages are
 stored in a MySQL DB Table. But i have no idea how to
 do this, that the number of times that Record is
 picked up is counted!! Can anyone guide me as to how
 this can be achieved?

 Thanks,
 T. Edison jr.


 __
 Do You Yahoo!?
 Send your FREE holiday greetings online!
 http://greetings.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Counting Views on records in DB!

2001-12-21 Thread Bogdan Stancescu

To be exact,

update table messages set views=views+1 where id=$msg_id

Bogdan

Bas Jobsen wrote:

 UPDATE $table views=views+1

  picked up is counted!! Can anyone guide me as to how
  this can be achieved?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Counting Views on records in DB!

2001-12-21 Thread Thomas Edison Jr.

Hi,

 UPDATE $table views=views+1

Umm.. can you be a little more specific. I couldn't
make much sense, thought i could get the logic.
Thanks.

T. Edison jr.

  Hi,
  I was just going through some Message Board system
 and
  noticed that there is a Views column which gives
 how
  many times the Message has been viewed.
 
  I created a similar message board, where Messages
 are
  stored in a MySQL DB Table. But i have no idea how
 to
  do this, that the number of times that Record is
  picked up is counted!! Can anyone guide me as to
 how
  this can be achieved?
 
  Thanks,
  T. Edison jr.
 
 
  __
  Do You Yahoo!?
  Send your FREE holiday greetings online!
  http://greetings.yahoo.com


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Counting Views on records in DB!

2001-12-21 Thread Brian Rue

Add a column to your messages table called views. Whenever you read the
message (SELECT message FROM messages_table WHERE messageid='id';),
increment the column for that row (UPDATE messages_table SET views = views +
1 WHERE messageid='id';).
- Original Message -
From: Thomas Edison Jr. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, December 21, 2001 12:46 PM
Subject: Re: [PHP] Counting Views on records in DB!


Hi,

 UPDATE $table views=views+1

Umm.. can you be a little more specific. I couldn't
make much sense, thought i could get the logic.
Thanks.

T. Edison jr.

  Hi,
  I was just going through some Message Board system
 and
  noticed that there is a Views column which gives
 how
  many times the Message has been viewed.
 
  I created a similar message board, where Messages
 are
  stored in a MySQL DB Table. But i have no idea how
 to
  do this, that the number of times that Record is
  picked up is counted!! Can anyone guide me as to
 how
  this can be achieved?
 
  Thanks,
  T. Edison jr.
 
 
  __
  Do You Yahoo!?
  Send your FREE holiday greetings online!
  http://greetings.yahoo.com


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]