I have a pretty basic website connected to a database and I want to access the result of an SQL query:
$connection = mysql_connect("localhost", "username", "password")
or die(mysql_error());
mysql_select_db("Database")
or die(mysql_error());
$query = mysql_query("SELECT path FROM db1 WHERE id > 4");
while($row = mysql_fetch_object($query))
{
echo $row->path;
}
On the website nothing shows, not even an error (The SQL code works for sure)