MySQL Where problem

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

By gadefgaertgqe - April 22, 2015 - edited: April 22, 2015

Hi,

I have been trying to filter records using the where option, but seem to have hit a wall. I just don't seem to be able to get any results back and have an empty array.

I have an editor list of images. In there I have a drop down for 'Product' (to associate the image with a product) which is populated by using the "Get options from database (advanced)", as I have an editor list of products to easily add and create new products.

// load detail record from 'images'
  list($imagesRecords, $imagesMetaData) = getRecords(array(
    'tableName'   => 'images',
    'where' => "'product:label' = 'Hats and Scarfs'",
    'loadUploads' => true,
    'allowSearch' => false,
  ));

Any suggestions on where I am going wrong?

Thanks

Paul

Hi Ross,

That worked great. Thanks!

Paul