diff options
| author | Christian Weber | 2009-03-11 14:16:00 +0000 | 
|---|---|---|
| committer | Christian Weber | 2009-03-11 14:16:00 +0000 | 
| commit | df7acdd92e7d47ffffbbb00e551adefff5f514ff (patch) | |
| tree | 19f52b05895f04549f59f222edd75a543fdfede5 | |
| parent | 1c17adf96bd165b6676852f3b0efaf7137897059 (diff) | |
| download | itools-df7acdd92e7d47ffffbbb00e551adefff5f514ff.tar.gz itools-df7acdd92e7d47ffffbbb00e551adefff5f514ff.tar.bz2 itools-df7acdd92e7d47ffffbbb00e551adefff5f514ff.zip | |
support simple OR queries by introducing the magic scalar value "OR"
| -rw-r--r-- | it_dbi.class | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/it_dbi.class b/it_dbi.class index ce11a49..56fadbb 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -273,7 +273,10 @@ function _where($params = "", $link = null, $omit_where = false)  		{  			if (is_int($field)) /* no key specified; just append */  			{ -				$stringquery .= " $value"; +				if (strcasecmp($value, 'OR')) +					$stringquery .= " $value"; +				else +					$sep = ' OR ';  			}  			else  			{ |