I have a pretty basic website connected to an database and I want to access the result of an SQL query
$connection = mysql_connect("localhost", "username", "password")
$query = mysql_query("SELECT path FROM db1 WHERE id > 4");
while($row = mysql_fetch_object($query))
Since you stated in comments that there were no id greater than 4,
you could have just done
WHERE id >= 4 which means greater than or equal to 4 and you would have had results.