Syntax probs

Discussion in 'PHP' started by pangea, Mar 21, 2007.

  1. #1
    Hi,

    Can anyone tell me the correct syntax to search for values above or equal to the entered amount in a form:

    I tried >= and <= and greater than but it doesnt work!!

    would appreciate any ideas - thanks guys!
     
    pangea, Mar 21, 2007 IP
  2. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Take out that last and
    Also <= & >= work fine.
     
    hamidof, Mar 21, 2007 IP
  3. pangea

    pangea Guest

    Messages:
    557
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hamidof,

    thanks ill try that but it didnt like it last time......ill check again - thanks for your time
     
    pangea, Mar 22, 2007 IP
  4. pangea

    pangea Guest

    Messages:
    557
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    if i take out the and, i got the error that ' and " cant go next to each other. do i leave a space?
     
    pangea, Mar 22, 2007 IP
  5. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hamidof, Mar 23, 2007 IP
  6. srobona

    srobona Active Member

    Messages:
    577
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    88
    #6
    if($_REQUEST[status]!=""){

    Try this line like following:
    if($_REQUEST['status']!=""){
     
    srobona, Mar 23, 2007 IP
  7. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I also think you'll find that you'll do better without the percentage signs on either side of the values you are testing against. I was under the impression that they are used for strings, not numbers...
     
    TwistMyArm, Mar 24, 2007 IP
  8. Rasczak

    Rasczak Peon

    Messages:
    131
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    you're right... as well, that multi-IFfy code could be made a little bit more re-readable ;-) i will try to find out a shorter way...
     
    Rasczak, Mar 24, 2007 IP