----- Original Message ----- 
From: "Priya Koya" <[email protected]>
To: "cf-talk" <[email protected]>


> I have an issue and I am out of my mind...... to solve it.
>
> FieldNames:
>
> FirstName, LastName,Address,PhoneNumber, EmployerID, DepartmentID , 
> DepartmentName, EmployerID, Branch

Ok, what about these field names?  Can you explain for us please?  Are these 
columns in a table?  Columns in a result set? Do you realize you have 
EmployerID in there twice??

>
> Table Employee
> FirstName, LastName,Address,PhoneNumber, EmployerID
>

Is EmployerID the primary key or a foreign key?  I would have expected it to 
be called EmployeeID if it were the primary key, since an employer employs 
the employee.

> Table Department
> DepartmentID , DepartmentName, EmployerID, Branch


> I have a FirstName attribute in the table and I want to compare these 
> attribute (FirstName) with the fieldvalue.

What field value?? Is this in a ColdFusion page or a SQL statement?  Where 
is the fieldvalue coming from?  A form?  The Url?  In what way do you want 
to compare?  Do you want to compare a single record, or more than one?

? I thought of using arrays but I don't know how to add database date to the 
array and compare.

What is a database date?  None of the columns you have mentioned so far seem 
to have anything to do with dates.  Setting a date into an array is easy as 
<cfset myArray = [now()]>  but I'm not sure where you are going with this.

> I also have one more issue. I am trying to insert data into the database 
> and once the data is inserted the inserted (FirstName) should be displayed 
> (Primary Key is EmployerID).

What table is this?  The employee table?  If EmployerID is the primary key 
of the Employee table, why is that column also in the Department table?  If 
two people are in the same department, do you have two department records 
with the same department name, but different EmployerIds?  I'm quite 
confused.

> If I add n number of FirstNames in the table in the session then it should 
> display those many New entry values in the main page. How can we do it?

Is the table in session, or do you simply mean inserts into the database 
during a user's session?  So you want to have a screen that shows someone 
the records they entered since their session started?  You could store the 
data in a session variable, or store the primary key of the records they 
inserted.   I'm not sure where you are headed, but this would also be 
possible if you had a userIDModified in the table and a datetimeCreated 
column.  You could simply query out the records that user had inserted since 
the time their session started.

> Can anyone help me with this?

Probably, but we need a bit more direction on what it is you are doing.  I'm 
pretty bad at guessing.

~Brad


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320253
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to