diff options
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/it_dbi.class b/it_dbi.class index 644bec5..bc640b3 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -418,11 +418,12 @@ function read($id=null) /** * Select a set of records from table and fetch the first one * @param $query Optional array of (field => value) or (int => sqlstring) pairs. Defaults to null (select all records) - * Fields are joined by AND - * Fields can contain a compare operator, e.g. 'name LIKE' or 'amount >' + * Fields will be joined by AND + * Fields can contain a compare operator: 'name LIKE' => "j%" or 'amount >' => 100 + * Fields can start with - to prevent quoting of right side: '-modified' => "CURDATE()" * $query can contain magic field 'SELECT' for things like 'COUNT(*)' or 'DISTINCT foo', defaults to '*' * $query can contain magic field 'JOIN' for things like 'tableA LEFT JOIN tableB ON a=b', defaults to table name - * $query can contain 'CALC_FOUND_ROWS', if true member var _found_rows contains number of matching rows without LIMIT + * $query can contain 'CALC_FOUND_ROWS', if true member var _found_rows contains number of matching rows before LIMIT * $query can contain 'NOFETCH', if true the first row is not prefetched (e.g. when directly using _result) * @return Number of matching rows, use iterate() to fetch the next record * @see iterate() |