select rakennukset.nimi, tilat.nimi from tilat, rakennukset where rakennukset.rakennus_id = tilat.rakennus_id order by rakennukset.nimi, tilat.nimi asc
I tried to use
if ( !is_int ( $key ) ) before adding td, but then I'm not getting the first (name) listed attall
Any thoughts? code is below, if u want to take a look:
<update>
The column that gives me headache seems to be the only column that each is not doubling, how this can be? I know that each outputs 1 dimension 4 cell array that contains associative and numeric keys to the key and value. But are there any conditions that each returns associative or numeric keys only?
</update>
Code: Select all
require_once 'all_db_login.inc';
$list_result = pg_query($all_link, $sql);
$return = "<table class="listaus">";
/* Go through all rows, construct td by td....*/
$row = 0;
while ($data = @pg_fetch_object ($list_result, $row)) {
$return .= "<tr>";
while(list($key, $val) = each($data)){
$return .= "<td class ="listaus">".$val."</td>";
}
$return .="</tr>";
$row++;
}
$return .= "</table>";
return $return;
}