Hacked By AnonymousFox
<?php include("../../../config/database.php");?>
<?php
$loop=0;
$sqlSubCategory = mysqli_query($cn,"select * from tbl_product");
while($sqlSubCategoryData = mysqli_fetch_array($sqlSubCategory))
{
$slug_url = mysqli_real_escape_string($cn,$sqlSubCategoryData['product']);
$slug_url = str_replace(" ","-",$slug_url);
$slug_url = strtolower($slug_url);
$sqlSlug = mysqli_query($cn,"select * from tbl_product where slug_url='".$slug_url."%'");
if(mysqli_num_rows($sqlSlug)>0)
{
$slug_url = $slug_url."-".mysqli_num_rows($sqlSlug)+1;
$sqlSubject = mysqli_query ($cn,"update tbl_product SET slug_url='$slug_url' where `id`='".$sqlSubCategoryData['id']."'");
}
else
{
$sqlSubject = mysqli_query ($cn,"update tbl_product SET slug_url='$slug_url' where `id`='".$sqlSubCategoryData['id']."'");
}
$loop++;
}
echo $loop;
?>
Hacked By AnonymousFox1.0, Coded By AnonymousFox