I have edited all the privileges for the user 'root'@'localhost
for table tblmembers
but still,
SELECT command denied to user ''@'localhost' for table 'tblmembers'
What is the problem? I'm looking for a solution for almost two days, and still I cant find answers.
Here is my code for selection:
<?php
$con = mysqli_connect('localhost','root','','add');
if(mysqli_connect_errno())
{
echo 'Cannot connect to database:' . mysqli_connect_errno();
}
$order = "SELECT firstName,lastName,ID FROM add.tblmembers";
$result = mysql_query($order);
if($result === false)
{
die(mysql_error());
}
echo "<table>";
while($row = mysql_fetch_array($result)){
echo "<tr><td>" . $row['firstName'] . "</td><td>" . $row['lastName'] . "</td><td>" . $row['ID'];
}
echo "</table>";
mysql_close($con);
?>