Dears
please help me in this matter
i have issue with my database mySQL
it is working with me fine with inserting items to the table but in selecting and fetching not working.
[php]
$sql2 = 'SELECT * FROM users
';
$result2 = $conn->query($sql2);
echo $result2->num_rows;
if ($result2->num_rows == 0) {
// output data of each row
while($row = $result2->fetch_assoc()) {
echo "id: " . $row[“id”]. " - Name: " . $row[“firstname”]. " " . $row[“lastname”]. “
”;
}
} else {
echo “0 results”;
}[/php]
always give me 0 result and i am sure there is content in that table ( users )
please help me guys I tried every thing I almost give up.
thanks,