Using ColdFusion, I need to figure out how to do the three types of searches, data display and sort, found as an example on this page: http://www.lisaturn.com/search.asp
. I need to create a similar page using similar data, and the searches will be identical to these examples using used cars.
I know how to create a CF database application and display data from the database, as well as create a password protected Admin display page of the full database data with an ADD, UPDATE or DELETE button so that the admin can manage the database data (if it's all in one table) I actually already have that part of the application completed. I also know how to display that data on a web page. What I don't know how to do, is to search the database with these dynamic multi selects (Make and then specifi Models), or how to display the multiple record counts (Under Search by Category), or how to sort the resulting searches (Sort Vehicles By). I was hoping to tackle each function one at a time, beginning with the searches if you could help me.
To begin, I first need to know if these searches can be done using one MySQL database table that includes all the information about each used car, or... QUESTION ONE: will I need to have a separate table for Make, one for Model, and one for Category? QUESTION TWO: The other database design question that I have is if there needs to be additional tables to normalize the database, then which table gets the foriegn key? I am always confused about that.
Currently, below is the one and only table I've been trying to work with, so far to figure out how to create these search elements:
TABLE NAME: SHM_Used_Cars
After I determine how many tables I will need, then I will proceed to ask about how to accomplish the remaining search functions, one at a time. I say one at a time because being self-taught, I need to figure out these tasks as I'm able to comprehend and learn what's going on. If I am over-whelmed with too many instructions at once, I just get confused and will waste both your time and mine. Therefore, I am seeking a solution one step at a time, if you don't mind helping me.
I should also mention that I've been trying to figure this out myself for over two weeks now. I've tried multiple examples that I've found on this site and others, but have not been able to get anything to work. I can show you one of the examples that I have so far, if you need me to, but I just think I should start over, if you don't mind helping me.
The attached code is one of the examples I am working on, but the process page is not working right, so I think I need to start over.
Your help is greatly appreciated. Thank you so much.
<cfquery name="q_all_makes" datasource="designpubdemo" username="elizabeth3" password="webdesyne3">
SELECT DISTINCT SHM_CarMake
ORDER BY SHM_CarMake
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="search_new_process4.cfm">
<option value="0">Select Vehicle Make</option>
<input type="submit" name="button" id="button" value="Search" />