Jump to content

Archived

This topic is now archived and is closed to further replies.

geekwannabe

processing database records

Recommended Posts

Whats the standard technique for walking through a database and processing each record? 

It seems that I need a php script that generates a php script.  But then how do I get it to call the script created and then return to the originating script and continue processing.  This kind of scenario was not a problem in Foxpro, the language I am most familiar with.  I tried setting up an odbc connection and doing the processing from foxpro.  That method has serious performance problems!

Share this post


Link to post
Share on other sites
Hi

im afraid im only familiar with mySQL connections  - but something like this may be helpful



$host = "localhost";
$user = "??";
$pass = "??";

mysql_connect($host,$user,$pass);
mysql_select_db("mydb");

$SQL = "SELECT * FROM mytable;";

$result = mysql_query($SQL);
while ($row = mysql_fetch_row($result))
{
  echo $row[0] . $row[1];
}

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.