Using the ' where ' statement

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 29, 2009   (RSS)

By Mel - December 27, 2009

Hi Seasons greetings everyone.

What I am trying to do is select records using 2 alternatives to select records for displaying

' area1 ' is a checkbox available on all records and if checked the value is 1

Using the statement below it is calling up all records in the database - and not just for the 2 alternatives

Using the ' where ' statement on its own works just fine
and only calls up leeds records

can somebody tell me what I am doing wrong?

<?php
require_once "/home/esc110/public_html/cmsAdmin/lib/viewer_functions.php";

list($biosRecords, $biosDetails) = getRecords(array(
'tableName' => 'bios',
'perPage' => '10',
'where' => ' areas_covered LIKE "%leeds%"' or 'area1 "%1%"',
'orderBy' => 'view_order',

));

?>


Thanks - Mel

Re: [chris] Using the ' where ' statement

By Mel - December 29, 2009

Hi Mel,

Try this:

'where' => ' areas_covered LIKE "%leeds%" or area1 = "1"',

Does that help? Please let me know if you have any questions.


Hi Chris,

That worked - thank you

Mel