In the code below I connect to my DB and then SELECT * FROM the users table. I don’t understand why the WHILE loop works. $row contains nothing. So, it doesn’t ‘equal mysql_fetch_object($results)’. Yet, it is passed and the ‘$row->username’ are echoed. I’m a newb. If you reply, first “Thanks you” second "please speak to me as if i were a child’, lol.
[php]
$conn = mysql_connect(‘localhost’,‘root’,‘root’) or die(‘Could no connect’);
mysql_select_db(‘practice’);
$sql = mysql_query(‘SELECT * FROM users’);
while ($row = mysql_fetch_object($sql)) {
echo $row->username . “
”;
}
[/php]