I am trying to get data from a table to show in table manner.
$myid = 'First_User';
$checkQuery = "SELECT * FROM MyDatabase WHERE id='" . $myid . "';";
echo $checkQuery; // it returns SELECT * FROM MyDatabase WHERE id='First_User';. I run in mySQL console , and it returns the record.
$result = mysql_query($checkQuery);
$row = mysql_fetch_array($result);
The above seems not able to fetch anything. But says "Resource #3"
. No data seen.
$myid = 'First_User';
$checkQuery = "SELECT * FROM MyDatabase";
$result = mysql_query($checkQuery);
$row = mysql_fetch_array($result);
This works returning all data from MyDatabase. I do have First_User in MyDatabase.