|
mylu -> RE: SQL INSERT INTO statement to add a record (3/31/2007 20:16:05)
|
Why yes I can! With the SQL statement: INSERT INTO tbl_tickets_data (ticket_number,resolution,error_code,updated_by) VALUES ('ticket_number','resolution','error_code','updated_by') The Values added to the record are ticket_number, resolution, error_code , updated_by. Literally. When you click submit the words ticket_number, resolution, error_code , updated_by are added to the columns ticket_number, resolution, error_code , updated_by in the table tbl_tickets_data. (which is what the statement woould do as written) ticket_number is a field on my form. The field is auto populated by passing the "actual" ticket number, say 28445, from the actual record 28445 in the tbl_tickets table to the form. From there I need to pass that ticket number to the SQL statement above. So the data added to the table tbl_tickets_data.ticket_number needs to be dynamic. The ticket_number is the key field in the relational database. IE table one contains the original ticket and table two contains additional notes to the ticket with ticket_number and the primary key. Make sense?
|
|
|
|