programmher
Programmer
I have a list of movies I want to retrieve via a CF form.
If the users select the letter "B" from the form, I want the information they view to be a list of every movie that has a title that begins with "b".
I am experiencing difficulty in getting my query to correctly return my data. If I hard code the letter within the query, it works. If I use the following code, it does not work:
<cfquery name="movies" datasource="MovieList" dbtype="ODBC">
SELECT *
FROM tbl_movies
WHERE tbl_movies.title LIKE '%#title#%'
ORDER BY tbl_movies.title
</cfquery
There is probably a simple solution I am overlooking. I would appreciate any assistance!
If the users select the letter "B" from the form, I want the information they view to be a list of every movie that has a title that begins with "b".
I am experiencing difficulty in getting my query to correctly return my data. If I hard code the letter within the query, it works. If I use the following code, it does not work:
<cfquery name="movies" datasource="MovieList" dbtype="ODBC">
SELECT *
FROM tbl_movies
WHERE tbl_movies.title LIKE '%#title#%'
ORDER BY tbl_movies.title
</cfquery
There is probably a simple solution I am overlooking. I would appreciate any assistance!