hello! i have a little problem with counting rows from one table while there's another query already in 'while loop'...
so, the general thing is to:
select all from 'galerie' table
display results and show how many rows are in the second ('galerie_fill') table for the specific result
loop until first table ends...
in table 'galerie' every 'name' has its own unique id and in table 'galerie_fill' ids are not unique but they correspond to that 'name' in the first table...
my code for now is:
$selekt = mysql_query("SELECT * FROM galerie") or die(mysql_error());
while ($row=mysql_fetch_array($selekt)) {
$counting = mysql_num_rows("SELECT * FROM galerie_fill WHERE id = " . $row['id'] . "") or die(mysql_error());
echo "name: " . $row['name'] . "<br>" . $counting . " results";
}
for now i know that the error is in '$counting = ...' line but i don't get any error report at all so i'm not sure what am i doing wrong....
thanks in advance!