Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

[SOLVED] $strSQLInsert1 it only imports 1 record not all

$
0
0
hello - i need your help i have following script in before record added which it select some records and insert to other table / actually i would like to get all records from tblordersupplydetails where enqury link = description and insert all values to table proformachilditems.

My script below it only insert 1 record from tblordersupplydetails to proforormachilditems altough they can be 3-4 or more records - can someone help me ? thanks


quote




$strSQLSELECT = "SELECT * FROM tblordersupplydetails WHERE EnquryLink='".$values['description']."'";
$rs = db_query($strSQLSELECT,$conn);
$data = db_fetch_array($rs);



$strSQLInsert1 = "insert into proformachilditems (Description, ShortCode, UnitLink, Quantity, Curr)
values ('".$data['Description']."','".$data['ShortCode']."','".$data['UnitLink']."','".$data['Quantity']."'
,'".$data['Curr']."') " ;

CustomQuery($strSQLInsert1);
// Place event code here.
// Use "Add Action" button to add code snippets.

return true;

unquote

Viewing all articles
Browse latest Browse all 2586