Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
panel
/
pages
/
pincode
:
sCategory.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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; ?>