Hi Guys
Noob here.
Trying to browse MySql data through PHP script but getting this error:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\browse.php on line 8
This is the piece of code causing this:
<?php
$connect = mysqli_connect("192.168.0.3","demo","demo");
mysql_select_db("my_db");
$query = mysql_query("SELECT * FROM persons WHERE Age = '28' ");
WHILE($rows = mysql_fetch_array($query)):
$FirstName = $rows['FirstName'];
$LastName = $rows['LastName'];
$Age = $rows['Age'];
echo "$FirstName $LastName $Age";
endwhile;
?>
Pleas help!