bigtoe
Posts: 115
|
Posted: 12/30/2004, 1:27 PM |
|
I have 2 database tables:
create table T_bricks (
F_brick CHAR(10) NOT NULL,
PRIMARY KEY (F_brick),
F_brick_color CHAR(10),
F_brick_length CHAR(10),
F_brick_width CHAR(10),
F_brick_supplier CHAR(20),
F_brick_description CHAR(50)
);
create table T_walls (
F_wall CHAR(10) NOT NULL,
PRIMARY KEY (F_wall),
F_wall_brick_color CHAR(10),
F_wall_brick_length CHAR(10),
F_wall_brick_width CHAR(10),
F_wall_supervisor CHAR(20),
F_wall_location CHAR(50)
);
Assuming that:
The primary keys in both tables are auto generated and auto incremented.
The T_bricks table has 50 rows of data.
The user is looking at the record screen for T_bricks.
(This record screen was invoked by another grid screen.)
This record screen does not allow editing. All fields are labels.
I would like to put a Link on this T_bricks record screen. The text on
the Link will be "Create a Wall this type of Brick"
When the user clicks on this Link:
1. Get the data from the labels F_brick_color, F_brick_length and F_brick_width.
2. Insert a new row in the table T_walls using the data F_brick_color for F_wall_brick_color
F_brick_length for F_wall_brick_length
F_brick_width for F_wall_brick_width
3. Leave the rest of the fields blank for this row in T_walls.
4. Get the primary key for this new row in T_walls.
5. Pass this primary key as a parameter to the "edit_wall.php" page.
How can I do steps 1 thru 5 in CCS?
|