Jump to content

MonoConmab

New Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MonoConmab

  • Rank
    Newbie
  1. Taking the Column Names out of the quotes doesn't work either Also I'm new to PHP, how would I format this in PDO?
  2. I'm designing a rental service and am working on a query to see if an item is available in a certain date range So far my query is as follows $q = "SELECT SUM(quantity) AS total FROM orders, order_details WHERE orders.order_id = order_details.order_id"; $q .= " AND equip_ID =".$item['id']; $q .= " AND 'start_date' > '".$start_date."'"; $result = $db->query($q); $row = mysqli_fetch_assoc($result); $sum = $row['total']; Say for instance $start_date = 2021-03-03 the output of $q would be SELECT SUM(quantity) AS total FROM orders, order_details WHERE orders
×
×
  • 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.