From 6b4c65126f1ae474b409e491be4ae163e239124d Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 1 Oct 2007 13:01:21 +0000 Subject: documentation --- it_dbi.class | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'it_dbi.class') 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() */ -- cgit v1.2.3