Gridadd insert record to another database

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

Gridadd insert record to another database

Post by Bishu »

I would like to insert the records into another database while using the Gridadd
making the current table insert to FALSE

function Row_Inserting($rsold, &$rsnew) {
-------My Sql Query to insert the records to another table/database ;
return FALSE;
}

It insert only the first records from the Gridadd.
Anyone kindly help me to insert all the records from the gridadd to another table.


danielc
User
Posts: 1601

Post by danielc »

If you want to insert record into another table in grid add, try to add this in Page_Load server event for your list page:
$this->GridAddUrl = "YourTablelist.php?a=gridadd"; // this will change your gridadd link to redirect to other table grid add page.


Bishu
User
Posts: 429

Post by Bishu »

Thanks for your reply.

I don't want to redirect to any other page.

I want to insert a row records to another table from the Row_Inserting event while using gridadd as
function Row_Inserting($rsold, &$rsnew) {
-------My Sql Query to insert the records to another table/database ;
return FALSE;
}

It works only for the first records of gridadd.
How can i insert all the records of the gridadd.


danielc
User
Posts: 1601

Post by danielc »

Try to use this in Page_Load server event for your list page:
if ($this->CurrentAction == "gridinsert")
$this->UpdateTable = "YourTable"; // set your update table to your desired table.


Post Reply