Search

45 posts by 5 authors in: Forums > CMS Builder
Last Post: May 19, 2010   (RSS)

By gcod - May 7, 2010

And here is the php file.

The list of price table is not there because it's not created yet.

If you have a better solution for the range of price let me know.

Thanks.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com

Re: [gcod] Search

By Donna - May 7, 2010

Hi gcod,

Can you try attaching that file again? It doesn't look like it came through.
Donna

--
support@interactivetools.com

Re: [Donna] Search

By gcod - May 7, 2010

Here you go.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com
Attachments:

produits.php 6K

Re: [gcod] Search

By Jason - May 10, 2010

Hi,

Your price range drop down is going to require you to create a "where" statement where you're getting your records. It would look something like this:

list($productsRecords, $productsMetaData) = getRecords(array(
'tableName' => 'products',
'where' => 'MySQL WHERE STATMENT',
));


As for the textbox, you want it to search against every field in the table? To do this you're going to have to do a custom "Where" statement for that as well.

If you could give a bit more information about the fields you are trying to search on, I can try to help you out.

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/

By gcod - May 10, 2010

Hi Jason,

For the price I'll create a table with range of prices, I'll call it range_price, and I'll list all the possible range. Then I'll select the proper range in the wine table.
I'll have an other field with the specific price but I won't use it in the search, I'll only use the range.

For the text field I'd like to search for every tables that are already in the first drop downs (wines, producers, year, cepage, country and region).

So if someone type a year and select a range of price I'd like to show all the price that fit this search.

Last 2 things: How can I NOT show any wine when you arrive on the page and How can I show ALL the wines when the user click "View all wines".

Thanks for you help!
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com

Re: [gcod] Search

By Jason - May 11, 2010

Hi,

I see that you have 6 tables that you want to search (wines,producers,year,cepage,country,and region). But to do a search, you need to be searching against specific fields inside those tables. Can you tell me exactly which fields in each table you want the text box to search?

Also, can you attach the .php file where the user enters the search information.

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/

By gcod - May 11, 2010

Hi Jason,

For each of them the fields name are title.

I'm not sure what you want for the php page. I can give you the latest version of the page which include the text field and the drop down for the price range but the text field is connected to nothing right now.

Let me know and thanks for your help.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com
Attachments:

produits_001.php 7K

By gcod - May 12, 2010

Hi Jason,

It doesn't work.

After typing a value that you can find in one of the table (portugal or rioja) and hitting the search button, no value is displayed and the search drop down are all empty by the producer one.

No sure what is going on here.
---------------------------------------------------
Webmaster, SEO Analyst, Social Media Analyst
www.gabrielcoder.com

Re: [gcod] Search

By Donna - May 13, 2010

Hi gcod,

In your dropdown menus, you'll want to set the value of your "Any" (or the default "nothing selected") fields to just "". Right now, they're all set to 0, so you're actually searching every one of those fields for the value "0".

Instead, it'll look something like this:

<option value="" selected="selected">Name of Dropdown</option>

Give that a try and let me know if it starts working for you. :)
Donna

--
support@interactivetools.com