daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $currentMonth = date("Y-m");
  2.                 $sql0 = "SELECT id FROM invoices WHERE due_date LIKE '$currentMonth-%' ";
  3.                 $result0 = mysqli_query($conn, $sql0);
  4.                     while($r = mysqli_fetch_array($result0)) {
  5.                         $id = $r["id"];
  6.                         echo "</br></br>" . $r['id'] . "</br></br>";
  7.                         $rows = explode( ' ', $r["id"]);
  8.                         foreach($rows as $id){
  9.                             $result = mysqli_query($conn, "SELECT total FROM invoice_items WHERE invoice_id = '$id' ");
  10.                             while($row = mysqli_fetch_assoc($result)){
  11.                                 echo $row['total'];
  12.                                 $sumArray[] = $row['total'];
  13.                             }
  14.                         }
  15.                 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top