Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loop through records and call PHP sript to pass value into SQL stateme

Status
Not open for further replies.

Ranvier

Programmer
Jun 17, 2004
73
GB
Hello All,

I need some help with the following process - not sure where to start but this is what i have to do in my integration package:

For each row in my tableA I want to update it with a string value (the value is derived from an SQL statement using a condition - WHERE clause). The condition is an interger value and is obtained by calling a PHP script. The PHP script will return an interger which i then need to pass as the WHERE condition in the SQL statemnt.

Can I call a PHP script (URL) from an intergration package?
and if I can how do I get the integer it is returning as a result?
and pass it into my SQL statement [for each row in tableA]?

p.s. I have already got my connecion and have imported the data into my table so I just need to start from the point of accessing the tableA and looping through each record.

Many thanks
 
Ranvier,

I think you would find a better audience for your question on the PHP group:
Please try posting there. Meanwhile I use OOP so I do something like this:

$qi=new QueryIterator("golpo","postgres2", "");
$qi=execute("select name, email from users");
while($qi->valid()){
print_r($qi->current());
$qi->next();
}

AL Almeida
CIO
May all those that come behind us, find us faithful
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top