diff options
author | Urban Müller | 2007-11-13 13:24:20 +0000 |
---|---|---|
committer | Urban Müller | 2007-11-13 13:24:20 +0000 |
commit | e9ad4c2fc0333293436ea02d49032b3696667037 (patch) | |
tree | 1c5284da095153572c23f49ee580605faf1cc97d /it_dbi.class | |
parent | 9c63901111b4a718406f9544bc060958fedf90e6 (diff) | |
download | itools-e9ad4c2fc0333293436ea02d49032b3696667037.tar.gz itools-e9ad4c2fc0333293436ea02d49032b3696667037.tar.bz2 itools-e9ad4c2fc0333293436ea02d49032b3696667037.zip |
documentation
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() |