![]() |
Sergey Kornilov admin 7/30/2019 |
You can use an event like AfterSuccessfulRegistration to insert a record or records into another table. |
D
|
david22585 author 7/30/2019 |
You can use an event like AfterSuccessfulRegistration to insert a record or records into another table. More info: https://xlinesoft.com/phprunner/docs/after_successful_registration.htm https://xlinesoft.com/phprunner/docs/db_insert.htm
$data = array();
$sql = "INSERT INTO accounts_pending (fullname, email, password, address) values
|
![]() |
Sergey Kornilov admin 7/30/2019 |
AfterSuccessfulRegistration event doesn't have $values array defined and this is why you are getting an empty entry. You need to read the manual in order to see what you can use in that event: |
D
|
david22585 author 7/30/2019 |
AfterSuccessfulRegistration event doesn't have $values array defined and this is why you are getting an empty entry. You need to read the manual in order to see what you can use in that event: https://xlinesoft.com/phprunner/docs/after_successful_registration.htm
DB::Query("update accounts_values set unit=".$values["unit"].", building=".$values["building"].", address=".$values["address"].", linked='1' where id = ".$values["current_owner"]."" );
DB::Query("update accounts_data set linked='1' where id = " . $values["current_owner"] . "" );
|
M
|
Mark Kramer 7/31/2019 |
Thanks, I got that to work now but I'm now running into another issue. When trying to assign accounts, it won't push the right data when updating a table using the following code: DB::Query("update accounts_values set unit=".$values["unit"].", building=".$values["building"].", address=".$values["address"].", linked='1' where id = ".$values["current_owner"]."" );
DB::Query("update accounts_data set linked='1' where id = " . $values["current_owner"] . "" );
|
D
|
david22585 author 8/1/2019 |
On those fields that won't write, check the Validate As: and Mask: setting, Prevent duplicate values on the Edit as Field page/settings. Also make sure that it isn't set as a read only accidentally. Any of those can prevent it from saving the record.
DB::Query("update accounts_data set address=".$values['address']." where id = ".$values["current_owner"]."" );
|
![]() |
Sergey Kornilov admin 8/3/2019 |
When you create your SQL query make sure you are adding single quotes around text and date values. |