23 lines
675 B
PHP
Executable File
23 lines
675 B
PHP
Executable File
<?php
|
|
include_once("class.dbf.php");
|
|
include_once("/var/www/crm/config.php");
|
|
include_once("helper.php");
|
|
global $sugar_config;
|
|
$sql=mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
|
|
mysql_select_db($sugar_config['dbconfig']['db_name']);
|
|
|
|
mysql_query("set character set utf8;");
|
|
|
|
$path = dirname(__FILE__).'/_stany.dbf';
|
|
$dbfp = new dbf_class($path);
|
|
|
|
$num_recp=$dbfp->dbf_num_rec;
|
|
|
|
|
|
for($i=0;$i<$num_recp;$i++){
|
|
$rowp=$dbfp->getRowAssoc($i);
|
|
//update product
|
|
mysql_query("UPDATE ecmproducts set stock_min='".$rowp['STAN_MIN']."' where index_dod='".$rowp['INDEKS']."'");
|
|
}
|
|
|
|
?>
|