Where to check for matches and filter out

3 posts by 3 authors in: Forums > CMS Builder
Last Post: January 17, 2020   (RSS)

By gkornbluth - January 17, 2020

Hi Zicky.

Take a look at this recipe in my CMSB Cookbook.

It might help.



Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By daniel - January 17, 2020

Hi Zicky,

A very handy CMSB function for making properly escaped "where" statements is mysql_escapef(). In this case, you would use it like this:

'where' => mysql_escapef('floor_plan = ?', $floor_plansRecord['num']),

Try that out and let me know if it does the trick.

A note on usage: mysql_escapef() replaces the "?" in the string with the value provided. It can also handle additional values by adding more "?" characters, and each one will be replaced in sequence. For example:

mysql_escapef('one = ? AND two = ? AND three = ?', $one, $two, $three)


PHP Programmer