diff options
-rw-r--r-- | it_dbi.class | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/it_dbi.class b/it_dbi.class index 95eb18a..9207b63 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -422,10 +422,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) - * Can contain magic field 'SELECT' for things like 'COUNT(*)' or 'DISTINCT foo', defaults to '*' - * Can contain magic field 'JOIN' for things like 'tableA LEFT JOIN tableB ON a=b', defaults to table name - * If magic field 'CALC_FOUND_ROWS' is true, sets member var _found_rows to number of matching rows without LIMIT - * If magic field 'NOFETCH' is true, then the first row is not prefetched (e.g. when directly using _result) + * Fields are joined by AND + * Fields can contain a compare operator, e.g. 'name LIKE' or 'amount >' + * $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 '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 it_dbi::iterate(), it_dbi::_where() */ @@ -480,7 +482,7 @@ function select($query = null) /** - * Iterate through select()ed records + * Puts next result from previous select() in member variables * @return true if another record was fetched, false if no more records * @see it_dbi::select() */ |