Creating Dynamic SQL Statements

Note

This section uses <cfquery> tags for data access, and the example here should use ColdFusion Components as was described in the last chapter. However, to keep the examples simpler I will violate the rules I just taught you. I guess I’m saying that every rule has exceptions.

Now that you’re familiar with forms and how ColdFusion processes them, you can return to creating a movie search screen. The first screen enables visitors to search for a movie by title. Because this requires text input, you will need an <input> field of type text. The field name can be anything you want, but using the same name as the table column to which you’re comparing the value is generally a good idea.

Tip

When you’re creating ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.