This is my code using OO style:
$query = "SELECT * FROM articles LIMIT 1";
$result=mysqli_query($db, $query) or die("Could Not execute query.");
$row = $result->fetch_assoc()
echo $row;
Code using Procedural:
$query = "SELECT * FROM articles LIMIT 1";
$result=mysqli_query($db, $query) or die("Couldn't execute query.");
$row = mysqli_fetch_row($result);
echo $row;
I have tried various different ways of getting this to work and the query never seems to execute.
I am new to mysqli
from mysql and am struggling with some of the differences.
Apologies if there is an obvious answer to this question.
Any Help much appreciated.