RE: Need help in Php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You have four options here:

1) You can write a little utility that updates the appropriate fields in the
MySQL database, and run it periodically.

2) You can use a scheduled program executor like Cronjobs in Linux or
Windows' Scheduled Tasks.

3) You can write a routine into your index page that periodically checks to
see if fields require being updated, and then updates if necessary.  This
would be triggered by users viewing your index page, and should be done
early in your script.

4) You can use a MySQL trigger or event.  Triggers are a form of stored
procedures which execute code when a table is accessed.  The code can have
conditional statements and use some of MySQL's built-in time and date
functions to make the updates.  Events are available from MySQL 5.1.6 and
later.  Events are also a form of stored procedure, and operate on an
internal scheduled task manager in MySQL. Events are associated with a
single table.  You can schedule events to run every 1 MINUTE, or every 2
DAY, etc. You will need privileges to write and store procedures to be able
to do this.

Each of these solutions have their strengths and weaknesses.  IMHO,
cronjobs/crontab or MySQL events are to best solutions in most cases.
Having MySQL make the changes will be best for speed and minimizing server
load.

Gentlemike2


  -----Original Message-----
  From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx]On
Behalf Of sahil
  Sent: Sunday, March 28, 2010 7:17 AM
  To: php-objects@xxxxxxxxxxxxxxx
  Subject:  Need help in Php




  hi $Frendz;

  how can i change some records automatically after some time,
  means i insert a query where i put data="false" and after 1 months it
would update automatically as data="true"

  So plzzzzzz tell me what can i do...??

  Thankx in advanced
  Regard Sahil



  


[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux