Jump to content

moto51

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything 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. I have a database that inserts a record every 5 minutes, 24/7. I want to easily retrieve the closest record to the current time - 1 day. Could somebody point me into the right direction please.
  3. 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.
  4. So far neither, I'd just do HTML but as i'm still learning i'm open to options, and am I correct in thinking I should chuck it in a DB with a column for active/inactive? EDIT: By the way, the table isn't terribly large, max of 15 - 20 items.
  5. 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.