This topic is locked

select random record

4/19/2010 9:22:55 AM
PHPRunner General questions
A
azmola author

can i have table with it's values e.g 5,10,15,20 and when i add new record select random value from the first table and move to another table.

J
Jane 4/23/2010

Hi,
use Before record added event on the Eventstab to move record from one table to another. Here is a sample:

global $dal;

$AnotherTableName=$dal->Table("AnotherTableName");

$AnotherTableName->Fieldname1 = $values["Fieldname1"];

$AnotherTableName->Fieldname2 = $values["Fieldname2"];

$AnotherTableName->Fieldname3 = $values["Fieldname3"];

$AnotherTableName->Add();