I need a little assistance on a list viewer query if possible

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

By kkegans - April 27, 2015

I am not a PHP/MYSQL coder, and need a bit of help if possible?

How can I construct a load records query that will return all records if there are no variables passed in the URL, but only the records matching the passed variable if on exists?

Here is what I have now, and it works great if the variable is passed, but I also would like the default URL to return all of the list records?

  // load records from 'products_list'
  list($products_listRecords, $products_listMetaData) = getRecords(array(
    'tableName'   => 'products_list',
    'loadUploads' => true,
    'allowSearch' => true,
    'where' => "category = '$_GET[category]'",
    ));
   

Thanks for your help!

CMSB Rocks!
Thanks,
Kurt

By kkegans - April 27, 2015

Dave,  Thanks!!!

Leave it to me to try to make it difficult  ;-)

CMSB Rocks!
Thanks,
Kurt