Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $supertotalquery = "SELECT @total := 0";
- $supertotalrs = mysql_query($supertotalquery);
- $superupdateallquery = "
- 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
- ";
- $superupdateallrs = mysql_query($superupdateallquery);
Add Comment
Please, Sign In to add comment