Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2004, 02:14 AM
Registered User
 
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default sql count function - pls help and urgent

my program is used php + mysql.

how can i recount the total numbers of records shown in the screen when the time is 5am each day?

this is the sql for recount and updated the total records shown in the screen at mid night 12:00 everyday

$sql_s0 = "select count(*) from xx where Date >= current_date and Date < date_add(current_date, interval 1 day) ORDER BY Date DESC " ;
 
Old May 12th, 2004, 05:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Run your SQL statement as a PHP script on the commandline within a cron-job (aka. "scheduled task" on Windows), at 0500 hours each day. Write the output into a text log file, somewhere, or something, along with the data, and whatever other date you want added.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can any one help me pls Urgent..? venkatu2005 ASP.NET 1.0 and 1.1 Basics 1 April 8th, 2008 08:45 AM
sql count function - urgent and pls help miki SQL Language 1 June 14th, 2006 09:47 AM
is there any in built function to count page count g.tamilselvan MySQL 1 February 15th, 2006 07:43 AM
Pls Help me count records [soon after connection] amjad_mahmood VB Databases Basics 1 August 30th, 2005 07:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.