Hi Daverms!
I appreciate your quick response and gave me more knowledge how this thing should work.
Unfortunately, it has not work out for me. Here's what I did:
1. I created a brand new table called "employee" in my database
2. I am using MySQL Workbench as my gui for my database. I created columns (empid, firstname, lastname, address, and activeflag (as BLOB? I typed in BOOL for Boolean and BLOB showed up).
3. I entered 1 row of data. Unfortunately in the "activeflag" column I am not allowed to type anything to it. I was trying to type in 1, but it's not working.
4. I copied/paste your code to my cfm page called "emloyee.cfm".
5. I placed the code from <CFQUERY> all the way to the <CFIF> right above the <HTML> tag.. then paste the code inside the body (from the <script language part all the way to the <form>)
6. the only thing I change from your code was the datasource (which is my database/connection?).
7. I preview the page, it shows up as Employee: (Drop Down List) with no data. The text input did not show up either.
I think we're getting there.. I just don't know what I did wrong.
--------------------------------
UPDATE:
I managed to changed the activeflag status to 0 instead of 1 using the commandline MySQL. I couldn't get the Workbench to work on changing BOOL stuff.. I run the page. Check the drop-down list. a Value of "0" shows up. I selected it, then the input box shows up with the details for me to update or delete. Update and Delete function works.. so the only thing that is not working right now is the value "0" instead of the full name.
Also I wanted a "New Employee" in the drop down, then able to input new data into the input textfield to create a brand new employee.
Hi,
I think the firstname and lastname concatenation might be the reason (I did that in SQL server, where as you are trying that in MySQL)...
So, try rewriting this query,
<cfquery name="EmployeeSelect" datasource="your_dsn">
SELECT
empid,
lastname + ',' + firstname as employeename
FROM
employee
WHERE
activeflag=0
</cfquery>
as
<cfquery name="EmployeeSelect" datasource="your_dsn">
SELECT
empid,
concat(lastname,firstname) as employeename
FROM
employee
WHERE
activeflag=0
</cfquery>
I hope this might resolve your issue.
HTH