Problem with < or > , not working right?

Results 1 to 3 of 3

Thread: Problem with < or > , not working right?

  1. #1
    Join Date
    Dec 1969

    Default Problem with < or > , not working right?

    I have a DB that keeps track of scores for players in a game. I want to pull these scores at a certain point value. The less than and greater then signs are not working the way I want them for some reason. I have the DB feild set as Number and that is about it. Here is some code..<BR><BR>-----------------------------------------------------------------<BR><BR>&#060;%<BR> IF objRec("body_count_r") &#060; "500" AND objRec("body_count_r") &#060;&#062; "0" THEN<BR>%&#062;<BR> &#060;font face="Comic Sans MS, Arial, Georgia Ref, MS Serif" size="2"&#062;&#060;%=objRec("player_name")%&#062; &nbsp; -- Body Count &nbsp; -- (&#060;%=objRec("body_count_r")%&#062;)&#060;/font&#062;<BR><BR>&#060;% END IF %&#062;<BR><BR><BR>----------------------------------------------------------------<BR><BR>This code should check the value of body_count_r and if it is less then 500 and not 0 print out the following HTML, or at least that is what I thought it looked like. I have done this with each field but when I look at the page it stills shows them all, some fields are at 4000 and still show. Any ideas what could be wrong??<BR><BR>Likely something small that I am missing<BR><BR>Thanks in Advance<BR>Cheers,<BR>Stephen

  2. #2
    Markkk Guest

    Default RE: Problem with < or > , not working ri

    If the database field (body_count_r) is set as a number, you must compare it to a number (500), not to a text string ("500").<BR><BR>Try something like:<BR>IF objRec("body_count_r") &#060; 500 AND objRec("body_count_r") &#060;&#062; 0 THEN<BR>

  3. #3
    Join Date
    Dec 1969

    Default Should of seen that, works now THANKS! (nt)

    NT= No Text

Posting Permissions

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