Help with where clause syntax

3 posts by 3 authors in: Forums > CMS Builder
Last Post: May 18, 2009   (RSS)

By avrom - May 15, 2009 - edited: May 15, 2009

Hi Ross, Hi Dave,

Just trying to figure out how to add the $listing variable into the "where" statement. Can't quite figure out the correct syntax for that.

Much thanx !! :))


<?php
$listing = 'Accommodation';

list($business_profileRecords, $business_profileMetaData) = getRecords(array(
'tableName' => 'business_profile',
'where' => 'category = $listing',
));
?>

Re: [virgodesign] Help with where clause syntax

By Djulia - May 15, 2009 - edited: May 15, 2009

Hi Avrom,

You can perhaps use :

'Where' => " 'category = ' " . $listing . " ' ",

That must function.

Djulia