Multiple WHERE clause filters

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 8, 2012   (RSS)

Re: [markr] Multiple WHERE clause filters

By gregThomas - October 8, 2012

Hi,

It is possible to use an AND statement in the getRecords fuction and mysql_select. Where are you using the statement? If it's in a get_records function you should be able to do something like this:

list($test, $testMeta) = getRecords(array(
'tableName' => 'tableNameGoesHere',
'where' => "field1 ='1' AND field2 = '1'"
));


If your using the mysql_select function the easiest way to filter multiple fields like this:

$test = mysql_select('tableName', array('field1' => '1','field2' => '1'));

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] Multiple WHERE clause filters

By markr - October 8, 2012

I forgot to mention that I was using the getRecords fuction, and it works great. Thx