I'm typically a novice in web design and i'm trying to learn it using cold fusion as my server technology but i'm having problem with my select statements.
assuming i have a database named mydatabase (Microsoft access) that contains a table named students and i want to select fields form the table based on the value entered on the form input field, i would probably use something like this as the result page
<cfquery name="Getstudents" datasource="mydatabase">
SELECT * FROM students
WHERE Name(name of student in the table) = <cfqueryparam value="#Form.Name#" CFSQLType="CF_SQL_VARCHAR">
note: name = from the name of the students table
#form.name# = name of the form input field
My problem is that when ever a value that does not exist in the table is entered into the form input field, the result will display nothing at all, so i want to know how to set an error message to display whenever an invalid value is entered into the form input field, please help.
Any assistance of any sort will be highly appreciated.
my email is email@example.com