Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $query = 'SELECT * FROM "service__managers" WHERE "host" = 'localhost' LIMIT 1 ';
  2. //isFree() ensures that connection still exists and not busy
  3. $result = $this->isFree() && pg_send_query($this->connection, $query)
  4. ? pg_get_result($this->connection) }
  5. : null;
  6. if (is_resource($result)) {
  7. // sometimes returns ['?column?' => "1"]
  8. $row = pg_fetch_array($this->resource, 0, $type);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement