computerman
Posts: 27
|
| Posted: 01/14/2010, 6:42 PM |
|
$SQL = "select client_ID, total from accountinfo";
$db = new clsdbconnection1;
$db->query($SQL);
while($db->next_record())
{
$aaa = "insert into client_history (client_ID, balance) values (".$db->f("client_ID").", ".$db->f("total").")";
$db->query($aaa);
}
It only inserts first record 
what to make/change so array will go till end and process all results.?
any help greatly appreciated!
_________________
"whoever is a cruel, must be an old downtrod who has got authority,
whoever is a downtrod, must be an old cruel who has lost authority. "
An Oriental Saying |
 |
 |
Gena
Posts: 591
|
| Posted: 01/14/2010, 11:17 PM |
|
use different db connections for each query:
like
$db = new clsdbconnection1;
$db2 = new clsdbconnection1;
$SQL = "select client_ID, total from accountinfo";
$db->query($SQL);
while($db->next_record())
{
$aaa = "insert into client_history (client_ID, balance) values (".$db->f("client_ID").", ".$db->f("total").")";
$db2->query($aaa);
}
_________________
Gena |
 |
 |
Gena
Posts: 591
|
| Posted: 01/15/2010, 12:58 AM |
|
and don't forget CLOSE() both at the end...
_________________
Gena |
 |
 |
computerman
Posts: 27
|
| Posted: 01/15/2010, 4:02 AM |
|
Quote Gena:
and don't forget CLOSE() both at the end...
you are great!
thank you so much!
I owe you $$
_________________
"whoever is a cruel, must be an old downtrod who has got authority,
whoever is a downtrod, must be an old cruel who has lost authority. "
An Oriental Saying |
 |
 |
Gena
Posts: 591
|
| Posted: 01/15/2010, 4:06 AM |
|
thanks!
just look at my signature below 
_________________
Gena |
 |
 |
|