posting search queries within Home page

4 posts by 2 authors in: Forums > CMS Builder
Last Post: May 13, 2009   (RSS)

Re: [HDLLC] posting search queries within Home page

By ross - May 11, 2009

Hi Jeff

Thanks for posting!

You'll be able to have lists of your records appear anywhere you like and when you use a "where" clause in your viewer code, you can bring in specific listings.

Basically, you take that second link you sent me and use everything after the ? as part of the "where". Like this:


'where' => "sold = 0 AND state = 'Iowa'",

Just stick that up in your viewer code. We might need to adjust it a bit but that's the basics.

Let me know what you think ;).
-----------------------------------------------------------
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/

Re: [ross] posting search queries within Home page

By HDLLC - May 11, 2009

Hey Ross-

Works like a champ!

Only one question...

What if I am trying to do a listing_agent field search for keywords?

Right now, they have their first and last name as a pulldown list to choose from. So, I want to check the listing_agent table for "Mike Brown" let's say... I was doing this:

http://landandgame.com/Hunting-Land-For-Sale-List.php?listing_agent_keyword=Rod

How do I do the "keyword" part in the where clause?

Thanks!

--Jeff

Re: [HDLLC] posting search queries within Home page

By ross - May 13, 2009

Hi Jeff

To do keyword searching with SQL, you typcally us the LIKE command:

WHERE something LIKE 'something else'

Now, I am not sure if you'll need to go with that though as I don't quite understand what you are aiming for with this new search.

Did you just want to have some details from the agent that created the listing appear?

Let me know :).
-----------------------------------------------------------
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/