OK -I can do this in PhpMyAdmin (hard coded) - so its not a DB problem.
I am just getting started - thank you for the help.
I am creating a page to INSERT user information into two tables.
The first table is easy to accomplish. The user first and last name, e address, and they set a password - is INSERTED. VALUES pass and the user_id PRIMARY increments automatically - a record is stored.
The second table is a credit card table. It is a tinyblob which is necessary. I am using a @salt also. The record sets, no problem. I SELECT the @salt, and then AES_ENCRYPT the input value using the salt to the table. As said no problem.
Here is where I am not getting the logic. When I set the user table values, the PRIMARY key auto increments - right. I have created a column in the encode table (where the credit card info is stored) named user_id to act as the FOREIGN key INDEX. So that I can reference the credit card value through identifying the user's user_id in the users table. I do not know how to set the user_id in the FOREIGN key column in the second table to correlate, as it auto_increments in the first table. I have no idea how to send that same number to the second table.
Thank you,
Marc
I am just getting started - thank you for the help.
I am creating a page to INSERT user information into two tables.
The first table is easy to accomplish. The user first and last name, e address, and they set a password - is INSERTED. VALUES pass and the user_id PRIMARY increments automatically - a record is stored.
The second table is a credit card table. It is a tinyblob which is necessary. I am using a @salt also. The record sets, no problem. I SELECT the @salt, and then AES_ENCRYPT the input value using the salt to the table. As said no problem.
Here is where I am not getting the logic. When I set the user table values, the PRIMARY key auto increments - right. I have created a column in the encode table (where the credit card info is stored) named user_id to act as the FOREIGN key INDEX. So that I can reference the credit card value through identifying the user's user_id in the users table. I do not know how to set the user_id in the FOREIGN key column in the second table to correlate, as it auto_increments in the first table. I have no idea how to send that same number to the second table.
Thank you,
Marc
Comment