|
| |
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
Conter problem - 1/28/2008 5:17:11
Hi, I have a problem wich I don't have an idea how to solve. I need to create a counter something very simple like count=count+1 but I need the counter will start from 0 every day. I have a database and I'm holding a the current date in every record I am creating Any Idea.....?
|
|
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
RE: Conter problem - 1/30/2008 13:14:03
Hi, I just need to count the record every day Do you have any idea for me?
|
|
|
|
ou812
Posts: 1538 Joined: 1/5/2002 From: San Diego Status: online
|
RE: Conter problem - 1/31/2008 13:06:35
I'm not quite sure what you're looking to do either, or in what language, but I'll take a stab. In your database maybe have a table, called day_count. The table would have just one column, called rec_count, with an ID of a formatted date (yyyymmdd). Now, as a user visits your page, or wherever you need to increment the count, grab today's date from the server, and then read the row from the table and then add one to the count, and write it back out. Does that help?
_____________________________
-brian EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|