Transfer records from one table to another and validate

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
eayvl
User
Posts: 315

Transfer records from one table to another and validate

Post by eayvl »

Is it possible to transfer records from one table to another and validate if they already exist?

-The validation must be by name, nss and curp.

Table1
Filed (ID,name, nss, curp, rfc, birthdate, age, address)

Table2
Filed (ID,name, nss, curp, rfc, birthdate, age, address)

Thanks.


arbei
User
Posts: 9383

Post by arbei »

You can

  1. use Conn()->Execute(<SQL>) to retrieve the records.
  2. Use ew_ExecuteScalar(<SQL>) to validate the exists in the destination table with the SQL.
  3. Use ew_Execute(<SQL>) to run the insert statement.

Read help file topic: "Server Events and Client Scripts" -> "Some Global Functions".


Post Reply