<?php
$handle = fopen($strfile, "r");
if ($handle) {
$iteration = 0;
while ($file_conent = fgetcsv($handle, 1000, ",")) {
if ($iteration >= 0) {
$k = 0;
if ($file_conent[0] != '') {
if ($file_conent[1] != '') {
$products_status = tep_db_query("select products_id from products WHERE products_model='" . $file_conent[0] . "'");
$product_values = tep_db_fetch_array($products_status);
if (tep_db_num_rows($products_status) > 0) {
if ($action == 'update_product_quantity_csv') {
if ($file_conent[1] == 0) {
tep_db_query("update products set products_quantity = '" . $file_conent[1] . "',products_status =0