Quotes in search string
3 posts by 3 authors in: Forums > CMS Builder
Last Post: March 27, 2009 (RSS)
By pothompson - March 26, 2009
I'm trying to search a products section that I've created on a column that stores the size of the product in inches.
I can't seem to get around the problem that the quotes character seems to be causing.
I've currently tried both the following but no luck, does anybody have any ideas?
href="products.php?size_inches_keyword=4 " x 6"."
href="products.php?size_inches_keyword=4\" x 6\""
I can't seem to get around the problem that the quotes character seems to be causing.
I've currently tried both the following but no luck, does anybody have any ideas?
href="products.php?size_inches_keyword=4 " x 6"."
href="products.php?size_inches_keyword=4\" x 6\""
Re: [pothompson] Quotes in search string
By ross - March 26, 2009
Hi there.
Thanks for posting!
I am not actually sure a keyword search on a text field is going to be the best way to get this going. If you definitely want to keep it going with the textfield, take the inches symbol out and just add (in inches) to the field label.
One problem you may run into still though is if someone entered 4x6 instead of 4 x 6. You aren't going to get both of those in the same results. I actually think it might be better to have dedicated width and height fields. Both with (in inches) as part of the field label.
Let me know what you think :).
Thanks for posting!
I am not actually sure a keyword search on a text field is going to be the best way to get this going. If you definitely want to keep it going with the textfield, take the inches symbol out and just add (in inches) to the field label.
One problem you may run into still though is if someone entered 4x6 instead of 4 x 6. You aren't going to get both of those in the same results. I actually think it might be better to have dedicated width and height fields. Both with (in inches) as part of the field label.
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/
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: [pothompson] Quotes in search string
By Dave - March 27, 2009
Can you post an url to products.php?
The " approach should work, but you may need to encode space as well. Basically it all needs to be url encoded as well. Try this:
href="products.php?size_inches_keyword=4"+x+6""
Also note that your last quote had a period after it and not a semicolon.
Sometimes it's easier to debug these first by just typing different things into the url and seeing what works there and then figuring out how to represent that in the href link.
Hope that helps!
The " approach should work, but you may need to encode space as well. Basically it all needs to be url encoded as well. Try this:
href="products.php?size_inches_keyword=4"+x+6""
Also note that your last quote had a period after it and not a semicolon.
Sometimes it's easier to debug these first by just typing different things into the url and seeing what works there and then figuring out how to represent that in the href link.
Hope that helps!
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com