Skip to main content
Known Participant
June 25, 2009
Question

Check against pre-populated data

  • June 25, 2009
  • 1 reply
  • 521 views

Hi,

If anybody could help that would be very much appreciated..

I have adatabase populated with some serial numbers. And a form for customers to register their product by entering the specified serial number that's printed on their product.

What's the code to check if the entered serial number (by customer) matches the one we pre-populated in the database.

Many thanks

    This topic has been closed for replies.

    1 reply

    ilssac
    Inspiring
    June 25, 2009

    WHERE serialNumber = <cfqueryparam value="#form.serialNumber#" cfsqltype="cf_sql_varchar">

    Is usually considered the best pratice way to check user input against a database value, but is by no means the only way to it.

    Bob-ElAuthor
    Known Participant
    June 25, 2009

    Much appreciated Ian, I'll give it a go..

    Many thanks