Guest User

Untitled

a guest
Jun 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $supertotalquery = "SELECT @total := 0";
  2. $supertotalrs = mysql_query($supertotalquery);
  3. $superupdateallquery = "
  4. UPDATE Ledger SET total = @total := @total - if(withdrawl>0,withdrawl,0) + if(deposit>0,deposit,0) WHERE owner='$_SESSION[owner]' AND ledger_name='$_SESSION[active_ledger]' ORDER BY the_date ASC, deposit DESC, entry_id ASC
  5. ";
  6. $superupdateallrs = mysql_query($superupdateallquery);
Add Comment
Please, Sign In to add comment