I am trying to run a very simple test script. This one works:
<?php
$link = mysqli_connect("localhost", "******", "******", "*******");
$result = mysqli_query($link, "SELECT FOO FROM BENCHMARK");
while($get = mysqli_fetch_object($result)){
echo $get->FOO."<br />";
}
?>
This one doesn't work:
<?php
$link = mysqli_connect("localhost", "******", "******", "*******");
$result = mysqli_query($link, "SELECT * FROM BENCHMARK");
while($get = mysqli_fetch_object($result)){
echo $get->FOO."<br />";
}
?>
In the second one, instead of "SELECT FOO FROM" I did "SELECT * FROM" (which you're totally allowed to do, right? WRONG.
It seems that when I say "SELECT * FROM" mysqli_fetch_object (or mysqli_fetch_array) doesn't work. The weirdest thing is, it doesn't even return an error in the browser, it just comes up blank! Is this a PHP config issue or a code issue, or both?
I should note that using mysql not mysqli works fine here, but we need mysqli for the app we're building so we can't use just mysql.
Thanks for y'all's help in advance.
-b