user name into table field

i have tow table table A and table B i use insert into with select statement to in row deleting from table A to insert archive data to table B i have field in table B for the user delete the record all field gone except the user filed?

Can you post your code for discussion and explain “all field gone except the user filed”?

$myResult = Execute(“INSERT INTO tblarchiveold (ofno, oname, oidno, ocno, omno, otohma, onotes, ouseru)
SELECT
pfno, pname, pidno, pcno, pmno, ptohma, pnotes
FROM Tblarchive where aid = $rs[aid]”);i want in the last filed in table (ouseru) to insert current user name?

Change your SQL to: "… = " . $rs[“aid”]

no sir the code to insert data is fine but i wand in the last field to insert the current user name how can i fetch the user name and modify the code to insert username with selected data?
thanks for you reply

Then you cannot use INSERT INTO … SELECT …, you need to build the INSERT statement yourself. The current user name can be obtained by the PHP function CurrentUserName().

Try using ‘Inner join’ syntax. Please check on MySQL Documentation.

sorry can you give an example to catch the user name?

Search CurrentUserInfo in PHPMaker 2020 Help