if found...
| From: | Christian C. | Date: | Wed, 07 Nov 2001 00:54:51 +0000 |
| Subject: | if found... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73664@lists.php.net to get a copy of this message | ||
Hello :c)
Im trying to syncronyze a price list that i recive each month.
The file is a excel file that i convert to access.
Now my logic is to select * from the new table and compare each
entry to the old table:
<?
//connect to the database
$connectionstring = odbc_connect("testDB", "Admin", "");
//SQL query
$Query = "SELECT Field1, Field2, Field3, Field4 FROM WC_PRO_NEW;";
//execute query
$QueryNewTable = odbc_do($connectionstring, $Query);
//query database
while(odbc_fetch_row($QueryNewTable))
{
$WC_PRO_PART_NUM_NEW = odbc_result($QueryNewTable, 1);
$WC_PRO_MFG_NUM_NEW = odbc_result($QueryNewTable, 2);
$WC_PRO_DESC_NEW = odbc_result($QueryNewTable, 3);
$WC_PRO_PRICE_NEW = odbc_result($QueryNewTable, 4);
//do lookup in old table
$QueryOldTableSql = "SELECT WC_PRO_PART_NUM FROM WC_PRO
WHERE(WC_PRO.WC_PRO_PART_NUM='$WC_PRO_PART_NUM_NEW')";
//execute query
$QueryOldTable = odbc_do($connectionstring, $QueryOldTableSql);
// this where im stuck...
}
//disconnect from database
odbc_close($connectionstring);
?>
This is what i have so far, i dont know how to find out if there
was a entry that was found.
Is there a way to retunr the record cout when using accsess??
Also looking at this piece of code, are there things i could should
chane to make this better??
Thanks
Christian
www.charetx2.com