1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Mexico DF Mexico
    Rep Power

    Can anyone help me? Im using php3, mysql and win2000(windows).

    I want to update a registry in a cell called "stat" the values are 0 and 1, the fact here is that the default value when someone registers its stat = 0 that means active for me, I have another cell called ultimovloreg that has a date registry yyyy-mm-dd, now, what i want to do is if today its greater than 1 month update stat = 1 and another scrip that if the ultimovloreg updates and now today its not greater than 1 month, update stat = 0

    Ill apreciate all the help that I recieve, Thanx allot

    [This message has been edited by ltena (edited July 22, 2000).]
  2. #2
  3. No Profile Picture
    a total freak
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    im not pretty sure about what you intended to do, but im getting the picture as if today is greater than one month of the date registered in ultimovloreg, update the stat..

    $query = mysql_query("select *,ultimovloreg+30 as deadline from yourtable");
    while($theData = mysql_fetch_array($query)) {
    if(date("Ymd") > $theData["deadline"]) {
    mysql_query("update yourtable set stat='1'");
    } else {
    mysql_query("update yourtable set stat='0'");

    well, something like that..

    [This message has been edited by freakyG! (edited July 23, 2000).]

Similar Threads

  1. Replies: 3
    Last Post: February 11th, 2004, 08:30 AM
  2. mysql data updation not working
    By krishang in forum PHP Development
    Replies: 2
    Last Post: February 10th, 2004, 08:05 AM
  3. mysql data lost
    By imola in forum MySQL Help
    Replies: 1
    Last Post: February 10th, 2004, 07:39 AM
  4. Replies: 1
    Last Post: February 5th, 2004, 06:17 AM
  5. Replies: 0
    Last Post: January 30th, 2004, 08:46 PM

IMN logo majestic logo threadwatch logo seochat tools logo