Searching by salary

Results 1 to 2 of 2

Thread: Searching by salary

  1. #1
    Join Date
    Dec 1969

    Default Searching by salary

    I want to search a database by salary. <BR><BR>It works fine if I input "25000" but throws an error if I input "$25000" or "25,000"<BR><BR>How should I handle these inputs?<BR><BR>Thanks!!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Searching by salary

    Depends on how clever you want to be.<BR><BR>Either throw them out because they&#039;re not numeric (which is what you should be doing if the input fails validation or you&#039;re exposing yourself to SQL injection attacks!)...<BR><BR>Or try and parse what you get into a number.<BR><BR>Craig.

Posting Permissions

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