Browse Source

SqlResultProvider fetchField - check for empty result

namespace
Alexander Demidov 11 years ago
parent
commit
d3f367d990
  1. 7
      Model/SqlResultProvider.php

7
Model/SqlResultProvider.php

@ -101,7 +101,12 @@ class SqlResultProvider implements iSqlResultItems
*/ */
public function fetchField($field) public function fetchField($field)
{ {
return $this->result->fetchField($field);
if ($this->result->numRows())
{
return $this->result->fetchField($field);
} else {
return false;
}
} }
/** /**

Loading…
Cancel
Save