I know this is basic, but I can't seem to find the answer:
I have a query that returns the desired rows in PHPMyAdmin but am clearly doing something wrong on my page because it only seems two return rows in the array.
Here is the code:
$editgroupid = 'm101';
$query = "SELECT dentists.id
from groups, groupdentlink, dentists
WHERE groups.id = '$editgroupid'
AND groups.id = groupdentlink.f_group_id
AND groupdentlink.f_dent_id = dentists.id
ORDER BY dentists.name";
$resultdent = mysql_query($query) or die(mysql_error());
$dents = mysql_fetch_array($resultdent);
print_r(array_values($dents));
On the page I get:
Array ( [0] => UTG69 [1] => UTG69 )
But in PHPMyAdmin I get like 40 rows.
$queryin PHPMyAdmin or typing what you think the query is?