Page 2 of 2 FirstFirst 12
Results 26 to 49 of 49
  1. #26
    Join Date
    Jan 2010
    Location
    good ole UK
    Posts
    341
    Quote Originally Posted by kendalbren View Post
    Harzem, Sam, you're both correct. This is really confusing, isn't it?

    The bottom line is:

    If someone needs 200-2500 sqft of space, it's OK for them to get a property that's 3000 sqft size?

    If someone needs 200-2500 sqft of space, it's NOT OK for them to get a property that's 2000 sqft size, because they may need 2500?

    How can that be achieved? My head hurts!
    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.

  2. #27
    Quote Originally Posted by Driver01 View Post
    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
    for example?
    I considered both of these until the op said:

    Space from should be not greater than the maximum size. Space to should not be less than the minimum size.

  3. #28
    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.

  4. #29
    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.

  5. #30
    Quote Originally Posted by kendalbren View Post
    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.
    I'll put it at a range of 100 for now, you can always change it later.

  6. #31
    Join Date
    Jul 2009
    Posts
    70
    That would be great - cheers!

  7. #32
    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.

  8. #33
    Join Date
    Jan 2010
    Location
    good ole UK
    Posts
    341
    Quote Originally Posted by SamBarrow View Post
    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.
    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.

  9. #34
    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!

  10. #35
    Quote Originally Posted by kendalbren View Post
    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!
    Done.

    Add a $sizeRange variable to conf.php.
    Right now $sizeRange = 100.

  11. #36
    Join Date
    Jul 2009
    Posts
    70
    Thanks Sam,
    Could you let me have the files for testing?

    Cheers,

  12. #37
    I didn't test results.php, only checkNumRows.php. Just copied the sql over.
    Attached Files Attached Files

  13. #38
    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...

  14. #39
    Working fine for me. Can you echo $sql before the query runs, and send me the raw query?

  15. #40
    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,

  16. #41
    Join Date
    Jul 2009
    Posts
    70
    Hi Sam,
    Any joy with the results.php page?
    Cheers,

  17. #42
    Give this a shot
    Attached Files Attached Files

  18. #43
    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?

  19. #44
    Yeah I'm getting property 96 back on a search for 500-2500

  20. #45
    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.

  21. #46
    Here's your problem: $_POST["$maxsize + $sizeRange"]; Did you add this? I'm about 99% sure I didn't.

  22. #47
    Working now - size 500-2500 gets 29 results including prop 96

  23. #48
    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 ~*

  24. #49
    Join Date
    Jul 2009
    Posts
    70
    Hi Sosolabs,

    I think we've resolved the issue now but thanks for your input.

    Cheers,

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Need nginx + php expert to solve weird problem
    By marmoset01 in forum Systems Management Requests
    Replies: 7
    Last Post: 05-18-2010, 04:57 PM
  2. $50 reward to whoever can solve this PHP Form MIME Header problem:
    By vonaras in forum Employment / Job Offers
    Replies: 18
    Last Post: 04-04-2006, 11:37 PM
  3. need someone to solve small php problem
    By Hostlead in forum Employment / Job Offers
    Replies: 2
    Last Post: 08-03-2005, 05:22 PM
  4. PHP and Ticketsmith. Can you solve my problem?
    By Domenico in forum Hosting Software and Control Panels
    Replies: 10
    Last Post: 10-24-2001, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •