MINI MINI MANI MO
<?php
// including the config file
include('config.php');
$pdo = connect();
// get the list of blog id separated by cama (,)
$list_order = $_POST['list_order'];
// convert the string list to an array
$list = explode(',' , $list_order);
$i = 1 ;
foreach($list as $id) {
try {
$sql = 'UPDATE branch SET branch_no = :branch_no WHERE branch_id = :branch_id' ;
$query = $pdo->prepare($sql);
$query->bindParam(':branch_no', $i, PDO::PARAM_INT);
$query->bindParam(':branch_id', $id, PDO::PARAM_INT);
$query->execute();
} catch (PDOException $e) {
echo 'PDOException : '. $e->getMessage();
}
$i++ ;
}
?>
OHA YOOOO