I am trying to fetch a row from my mysql DB using mysqli query.
PHP
$_SESSION['orderID'] = "632";
$orID = $_SESSION['orderID'];
$sql = $db->prepare('SELECT * FROM order_list WHERE order_id = ? ');
$sql->bind_param('s',$orID);
$sql->execute();
while($row = $sql->fetch())
{
$productid = $row[0];
$name = $row[1];
echo $price = $row[2];
}
give no error in console and no result,
I have been trying to check the answers on stack overflow, I also googled it but all the suggestions gives me the same error.
I am pretty new with mysqli, your help will be highly appreciated