You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
$pg = $this->pgsqlClientDbPool->get(1); $s = $pg->query("select * from tbl_company where company_id=12312312"); //something not exist $data = $pg->fetchAll($s); // the $data variable will be false
foreach ($data as $datum) // there is a warning show up // do something
The $data variable will be FALSE, and a warning shown up in foreach statement. The code will go only if I check whether the $data is false and then give it an empty array value.
It's different behavior than most client implement.
To change this behavior is easy, change line 864 in swoole_postgresql_coro.cc file, from FAILURE to SUCCESS.
The fetchAll above will return an empty array.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
example:
$pg = $this->pgsqlClientDbPool->get(1);
$s = $pg->query("select * from tbl_company where company_id=12312312"); //something not exist
$data = $pg->fetchAll($s); // the $data variable will be false
foreach ($data as $datum) // there is a warning show up
// do something
The $data variable will be FALSE, and a warning shown up in foreach statement. The code will go only if I check whether the $data is false and then give it an empty array value.
It's different behavior than most client implement.
To change this behavior is easy, change line 864 in swoole_postgresql_coro.cc file, from FAILURE to SUCCESS.
The fetchAll above will return an empty array.
The text was updated successfully, but these errors were encountered: