Quote:
<?php
$con=mysqli_connect "localhost","maindata","pass","user");
$result=mysqli_query("SELECT * FROM Recipe WHERE Category REGEXP 'diabetic'");
$data=mysqli_fetch_assoc($result);
echo $data['total'];
?>
|
I'm trying to display a recipe count at the top of a page based on how many 'diabetic' friendly recipes I have in my database, but for some reason can't get the code above working.
Is there an easier way to do this that I'm missing?
