Code: Select all
$listsql = "SELECT *";
$listsql = $listsql . " FROM appartement AS a, app2socat AS a2s, category AS c, periode AS p";
$listsql = $listsql . ", reservaties AS r, sport_ontsp AS so";
$listsql = $listsql . " WHERE a2s.app_id = a.app_id" ;
$listsql = $listsql . " AND a2s.cat_id = c.cat_id";
$listsql = $listsql . " AND r.res_app_id = a.app_id";
$listsql = $listsql . " AND r.res_per_id = p.per_id";
$listsql = $listsql . " AND so.so_category_id = c.cat_id";
$listsql = $listsql . " AND p.maand = \"$maand\"";Code: Select all
$listresults = mysql_query ( $listsql )
or die("Invalid query: " . mysql_error());
$listnum_rows = mysql_num_rows($listresults);
for($listi = 0; $listi < $listnum_rows; $listi++) {
$listrow = mysql_fetch_array($listresults, MYSQL_ASSOC);
echo $listrow["straat"] . "<br>";
}Can someone help me out here?