%PDF- %PDF-
Direktori : /home/nailstv/public_html/ |
Current File : /home/nailstv/public_html/_termek_rendbetesz.php |
<?php require_once 'config/config.php'; $db = Db::getInstance(); $kdb = Db::kdb('cncom_shop'); $sql = "SELECT * FROM termekek WHERE storno = 'f'"; $termekek = $db->GetArray($sql); foreach($termekek as $key=>$val){ $link = $val['link']; $termek = str_replace("http://www.crystalnails.com/webshop/","",$link); $termek = end(explode("/", $termek)); $termek = explode("-", $termek); array_pop($termek); $termek_nev = implode("%", $termek); //print $termek_nev; die; $sql = "SELECT id FROM termek WHERE nev LIKE '".$termek_nev."'"; $termek_id = $kdb->GetRow($sql); print $val['link']; print '<br />'; print $termek_nev; print '<br />'; print_r($termek_id); print '<br />';print '<br />';print '<br />'; /* if(empty($termek_id)){ $bind = array($val['id']); $sql = "UPDATE termekek SET aktiv = 'f' WHERE id = ?"; $db->Execute($sql, $bind); print $val['id']; print '<br>'; } else { print $sql; print_r($termek_id); die('asd'); } */ } ?>