Guest User

Untitled

a guest
May 28th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. global $DB2;
  2. global $DB;
  3.  
  4. $user = $_SESSION["userid"];
  5.  
  6. $query = $DB->prepare("SELECT server.custid FROM server, owners WHERE owners.domain = server.id AND owners.user = ?");
  7. $dbreturn = $DB->execute($query, array((int) $user));
  8. $row = $dbreturn->fetchRow(DB_FETCHMODE_OBJECT);
  9. /* print $row->custid; */
  10.  
  11. $query = $DB2->prepare("SELECT subtotal FROM tblinvoices WHERE userid = ? AND status = 'Unpaid'");
  12. $dbreturn2 = $DB2->execute($query, array((int) $row->custid));
  13. $row2 = $dbreturn2->fetchRow(DB_FETCHMODE_OBJECT);
  14. print $row2->subtotal;
Add Comment
Please, Sign In to add comment