Jump to content

zoominomad

New Members
  • Posts

    3
  • Joined

  • Last visited

zoominomad's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Awesome! Will I need to create a field in the table for days_till_calib? I also really appreciate the explanations for each example! It amazes me how efficient SQL is in the hands of someone who like you who knows how to use it!
  2. I'm trying to teach myself SQL/PHP by building a database driven local site for keeping track of my calibrated tools (lot of them). Basically my table looks like this: Table: calibrated_items Fields: serial_number, part_number, location, nomenclature, calib_freq, date_calib These tools have different intervals at which they need to be calibrated (180 days, 360 days, etc). I'm trying to figure out how I can query my list of tools and show how many days they have until due calibration. The date_calib field is a date field for when the tool was last calibrated (ie; 2013-07-24). calib_freq is the interval frequency for calibration (ie; 180 days). I'm currently querying the database like this: $callist = mysqli_query($con, "SELECT * FROM calibrated_items WHERE date_calib <= (NOW() - INTERVAL 180 DAY)"); I know this a jacked up way to try and accomplish what I'm aiming for. I just don't know enough to figure out how to use NOW() date_calib and and calib_freq to output a number of days until due field. I don't really need to save that field, I just want to output it to the webpage. I hope I included enough information for this to make sense. If not, let me know. Thanks!
  3. zoominomad

    Howdy

    I've played around with HTML and CSS for several years, but am trying to make myself learn PHP. I'm really wanting to start messing with some database projects, and am doing my best to learn as I go. I'm hoping to pick up on information from everyone here, and hopefully even offer some help.....somewhere.....on some topic that has nothing to do with having a working knowledge of php....or sql... Anyway, I'm glad I found the site and look forward to doing some learning!
×
×
  • 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.