- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
foreach ($sxe->categories->category as $category) {
$cid = $category['id'];
if ($clear == 0) {
$query = "SELECT `id` FROM `" . PREF . "category` WHERE `id`='" . $cid . "' LIMIT 1;";
$result = mysql_query($query);
if (mysql_num_rows($result) == 0) {
$parent = $category['parentId'];
$name = quote_smart($category);
$query = "INSERT IGNORE INTO `" . PREF . "category` VALUES('$cid','$parent','$name','1', 0);";
mysql_query($query);
}
} else {
$parent = $category['parentId'];
$name = quote_smart($category);
$query = "INSERT IGNORE INTO `" . PREF . "category` VALUES('$cid','$parent','$name','1');";
mysql_query($query);
}
$cat_i++;
}