Results 26 to 49 of 49
-
04-02-2011, 07:20 AM #26Web Hosting Guru
- Join Date
- Jan 2010
- Location
- good ole UK
- Posts
- 341
If you want to return all the properties greater than the min than just
[query] >$minsize
Or you could create an acceptable range for maximum so
$acceptablemaxsizerange = $maxsize + 1000
[query] BETWEEN $minsize and $acceptablemaxsizerange
for example that would return all properties greater than the min and 1000sqft above the max?Last edited by Driver01; 04-02-2011 at 07:23 AM.
█ I H4t3 l33T, l33T i5 4 l053r5!
██
███
████ Personally I'm always ready to learn, although I do not always like being taught.
-
04-02-2011, 07:21 AM #27Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
-
04-02-2011, 07:24 AM #28Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Sam, you're absolutely 100% correct. What my client is asking for would render the maximum size useless as it would just be ignored.
I've found another commercial property site which seems to do just that however. Please see this site.
In 'More search options', if you enter size from as 600 and size to as 2500, properties are returned which have a maximum size GREATER than 2500. Maybe this is specific to commercial property.
Could you help me out and set this up for me? At least I can then show my client.
Thanks for your efforts so far, I really appreciate it.
-
04-02-2011, 07:26 AM #29Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Maybe doing what Driver01 suggested and having an acceptable range is a good idea. I can then tweak it according to my client's preference.
Could you kindly build this into the code for me?
Thanks again guys.
-
04-02-2011, 07:29 AM #30Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
-
04-02-2011, 07:30 AM #31Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
That would be great - cheers!
-
04-02-2011, 07:32 AM #32Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
Okay now when you search for anything with size 500 - 2500, it comes back with anything from 400 - 2600, including property 96.
Seems kind of strange to make it work this way but if that's what your clients wants then that's what they want.
-
04-02-2011, 07:36 AM #33Web Hosting Guru
- Join Date
- Jan 2010
- Location
- good ole UK
- Posts
- 341
Well not really because if the client wants a property max size of 2500, you show him all the properties at max 2500 plus properties slightly larger as he may be convinced to go a little larger for the right property.? like showing related products in a commerce site I suppose.
█ I H4t3 l33T, l33T i5 4 l053r5!
██
███
████ Personally I'm always ready to learn, although I do not always like being taught.
-
04-02-2011, 07:37 AM #34Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Could you make it so the minimum size still works? It's only the maximum that would need the acceptable range.
Thanks.
I can't swear on this forum but I'd need to properly describe this particular client!
-
04-02-2011, 07:38 AM #35Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
-
04-02-2011, 07:42 AM #36Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Thanks Sam,
Could you let me have the files for testing?
Cheers,
-
04-02-2011, 07:48 AM #37Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
I didn't test results.php, only checkNumRows.php. Just copied the sql over.
-
04-02-2011, 07:57 AM #38Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
I'm getting no results found on the results page.
I've added $sizeRange = '100'; to the conf.php file. Is that correct?
Maybe you'll need to help me and test results.php for me?
Sorry...
-
04-02-2011, 08:18 AM #39Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
Working fine for me. Can you echo $sql before the query runs, and send me the raw query?
-
04-02-2011, 08:32 AM #40Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Sorry Sam but I've had to run and catch a train. On the search page, it's working beautifully but I'm still seeing no results on the results.php page.
Can you try at http://williamscomm.co.uk/test-new/
Thanks,
-
04-02-2011, 09:45 AM #41Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Hi Sam,
Any joy with the results.php page?
Cheers,
-
04-02-2011, 04:55 PM #42Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
Give this a shot
-
04-02-2011, 05:27 PM #43Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Cheers Sam. I'm not at home until Monday so I'll try it then.
Is the results page working ok for you?
-
04-02-2011, 05:29 PM #44Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
Yeah I'm getting property 96 back on a search for 500-2500
-
04-04-2011, 05:23 AM #45Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Hi again Sam,
I've uploaded the results.php file but it's still not working. Could you kindly take a look please? I'm just getting No results found on the results.php page. Please see here.
Thanks in advance.
-
04-05-2011, 07:01 AM #46Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
Here's your problem: $_POST["$maxsize + $sizeRange"]; Did you add this? I'm about 99% sure I didn't.
-
04-05-2011, 07:02 AM #47Disabled
- Join Date
- Jul 2009
- Posts
- 2,195
Working now - size 500-2500 gets 29 results including prop 96
-
04-05-2011, 08:52 AM #48Web Hosting Evangelist
- Join Date
- Sep 2009
- Posts
- 502
not sure why you are not loading all the properties into an array and then do a comparison statement to remove the ones that are above and below and then display them. That should make the query quicker and load faster.
*~ Shared,Reseller, and Cloud VPS Provider ~*
*~ Check out our site at 24Khost.com ~*
*~ Birchtreelane Gifts, Antiques, Books, Collectibles Birchtreelane.com ~*
-
04-05-2011, 09:17 AM #49Junior Guru Wannabe
- Join Date
- Jul 2009
- Posts
- 70
Hi Sosolabs,
I think we've resolved the issue now but thanks for your input.
Cheers,
Similar Threads
-
Need nginx + php expert to solve weird problem
By marmoset01 in forum Systems Management RequestsReplies: 7Last Post: 05-18-2010, 04:57 PM -
$50 reward to whoever can solve this PHP Form MIME Header problem:
By vonaras in forum Employment / Job OffersReplies: 18Last Post: 04-04-2006, 11:37 PM -
need someone to solve small php problem
By Hostlead in forum Employment / Job OffersReplies: 2Last Post: 08-03-2005, 05:22 PM -
PHP and Ticketsmith. Can you solve my problem?
By Domenico in forum Hosting Software and Control PanelsReplies: 10Last Post: 10-24-2001, 10:41 AM