mam taki fragmet kodu:
  1. <?php
  2.  
  3.  
  4. function processCheckReminder()
  5. {
  6. $this->db->executeStatement("SELECT checkReminder(" . $this->given["checked"] . ");");
  7. return $this->processShowCurrent();
  8. }
  9.  
  10. function processShowCurrent()
  11. {
  12. $sql = "SELECT * FROM current_reminders WHERE for_id=" . $this->user->userData["user_id"] . " OR (id_advert IS NOT NULL AND for_id IS NULL) order by activate_date";
  13. $ret = $this->db->loadAllRecords($sql) ;
  14. return $ret;
  15. }
  16.  
  17. ?>


funkcja "checkReminder" ustawia flagę "widzialne" na true natomiast widok "current_reminders" pokazuje tylko te wiersze, które były niewidziane.

problem wygląda następująco:

po odpaleniu funkcji processCheckReminder(), flaga jest ustawiana na true, natomiast w widoku widoczność jest jeszcze jako false. dopiero w następnym "obiegu" widoczność jest jako true. dostawienie "commit;" nic nie pomaga. składniowo wszystko jest wporządku, chodzi tylko o to opóźnienie.

mam postgresa w wersji 8.0.3