Where = limited results

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

By Jason - April 19, 2011

Hi,

You have to options for "where" in your query. Your second one will overwrite the first, which is why your record isn't coming up.

Try changing this:
// load records
list($product_categoriesRecords, $product_categoriesMetaData) = getRecords(array(
'tableName' => 'product_categories',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
'where' => ' title="Loudspeakers" ',

));


to this:

// load records
list($product_categoriesRecords, $product_categoriesMetaData) = getRecords(array(
'tableName' => 'product_categories',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',

));


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Where = limited results

No, that doesn't work. If I click on any of the links, it takes me to a /default-file.php page for each, ie, http://www.audiomarketing.com.au/default-file.php?14

Any other suggestions?

By Jason - April 20, 2011

Hi,

Could you please re-attach your .php file so we can see the latest version of the code you're working with.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Where = limited results

Here it is.
Thanks

Re: [Jason] Where = limited results

Hi Jason
No, no change. Still doesn't work. It's still trying to find the location of the /default-file.php?14 (or whatever page), although my categories are correct. Also, with one of the changes you listed earlier, the page title is now defaulting to Accessories, rather than Loudspeakers, because you asked me to remove the "where" = loudspeakers. Any ideas, or do I need to actually hardcode this in to get this resolved.
Thanks
PHP File attached again.

By Jason - April 27, 2011

Hi,

If you could fill out a [url http://www.interactivetools.com/support]2nd Level Support Request[/url] we can take a closer look at this issue for you.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/