Jump to content

moto51

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Posts posted by moto51

  1. Solved it, used PHP as I had to use it anyway.

     

    function minutes_round ($hour, $minutes = '5', $format = "H:i")
    {
        $seconds = strtotime($hour);
        $rounded = round($seconds / ($minutes * 60)) * ($minutes * 60);
        return date($format, $rounded);
    }
    
    
    $yesterdayDate = date("Y-m-d", mktime(0, 0, 0, date("m"),date("d")-1,date("Y")));
    $time = date( 'H:i:s');
    
    $time = minutes_round($time);

  2. Cheers, I think I know what has to be done, now that I know what way I should be doing it. Before I was thinking some form of text file with every status separated by a comma and then reading the text file into an array, and yeah making it terribly complicated.

  3. I've been browsing the foams for a while now but haven't posted until now. Anyway,

     

    I have a table containing a list of items, I want a column to have either a red or a green icon depending on the state I set manually. My question is, how would I best set this up? I'd like to be able to have a simple checkbox admin page that when saved the other page reflects the state either 0 (inactive) or 1 (active), what would be the best way of storing these values and then reading them again? By this I mean a text file, MySQL, etc.

     

    I have some knowledge of PHP and MySQL, though not a massive amount.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.