This topic is locked

Passing list-page data into another table

6/28/2007 7:19:09 AM
PHPRunner General questions
J
jwasielewski author

Hi all,
I need help for the following problem.

I have a list pages with different values and totals. Now I want to create a event on load of this page with

the "insert a record in another table" code.

I want to store the sessions id and the totals into another table, but I do not know how to pass

the data from list-page to another table.
Thanks a lot for your help.
Janina

J
Jane 6/29/2007

Janina,
to select data from the table on the ListOnLoad event use following code:

global $strSQL,$conn;

$rs = db_query($strSQL,$conn);

while ($data = db_fetch_array($rs))

{

echo $data["FieldName1"];

echo $data["FieldName2"];

}



where FieldName1 and FieldName2 are your actual field names.