how to ad an "and" in my sort

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

By willydoit - July 17, 2009

Hi,

I am trying to produce three seperate sorts in a listing which I have managed to do, we have three different categories of listing a featured listing, a standard listing and a complimentary listing, I want to configure it so that featured listings do not also appear in the standard listing as well, my basic code is working and shows the lists correctly except that my code 'orderBy' => 'RAND()', 'where' => 'comp_listing = 0', )); also includes listings which have been tagged as featured (because they are not complimentary listings) thus showing them twice, I tried to amend the code to 'orderBy' => 'RAND()', 'where' => 'comp_listing = 0' and 'featured_listing = 0' , )); assuming it would then not include anyrthing which was a featured listing but that continued to show them twice, I could add another field to the listings so that each entry is either featured, standard or complimentary which would resolve the issue but that would mean amending all my listings so if I can simply amend the sort code that would be easier.

I am sure it is just a simple syntax issue.

Any help would be appreciated.



Thanks in advance

Re: [willydoit] how to ad an "and" in my sort

By ross - July 17, 2009

Hi there.

Thanks for posting!

You should be able to do this bit I was curious if you could post up a whole copy of your page? Best case scenario would be posting it as an attachment instead of just putting the code in a post.

I'll take a closer look at everything and see what we can do. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/