[eluser]Samus[/eluser]
Okay so basically i'm working with codeigniter with some paypal integration.
Anyway to cut a long story short, when someone makes a payment and it is approved.
I have a method that is run which updates the 'amount paid' value in my table, then another method that is run that updates the 'percentage paid' value.
Now my problem is that now the the 'percentage paid' method runs before the 'amount paid' method, which means the 'percentage paid' value stays the same as it was before (because the amount paid value hasn't been updated yet) and the amount paid value updates after.
How would I get it so that the percentage value is updated after the paid value is updated?
I tried using sleep, but that didn't seem to work..
Code:
$this->endaproblem->update($xploded[1], $xploded[2], $update_paid);
sleep(1);
$this->endaproblem->update($xploded[1], $xploded[2], $update_percent);
Anyone have any ideas?