Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $DB2;
- global $DB;
- $user = $_SESSION["userid"];
- $query = $DB->prepare("SELECT server.custid FROM server, owners WHERE owners.domain = server.id AND owners.user = ?");
- $dbreturn = $DB->execute($query, array((int) $user));
- $row = $dbreturn->fetchRow(DB_FETCHMODE_OBJECT);
- /* print $row->custid; */
- $query = $DB2->prepare("SELECT subtotal FROM tblinvoices WHERE userid = ? AND status = 'Unpaid'");
- $dbreturn2 = $DB2->execute($query, array((int) $row->custid));
- $row2 = $dbreturn2->fetchRow(DB_FETCHMODE_OBJECT);
- print $row2->subtotal;
Add Comment
Please, Sign In to add comment