Jump to content

processing database records


geekwannabe

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!
Link to comment
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];
}
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.