I would like to read all the data from my database, when I run this query from the console I get many results but for some reason php is only reading one.
$query = "
SELECT b.raw as 'address', a.raw as 'name', c.TouchTime as 'time'
FROM touchName a, touchHome b, trackTouch c
WHERE a.raw like \"%{$name}%\"
AND c.AgentID = 1
AND a.relations = b.relations
AND b.relations = c.relations
AND a.relations = c.relations
ORDER BY time desc
";
//So we can double check in the console
echo $query . "<br><br>";
$result = mysqli_query($mc, $query);
$array = mysqli_fetch_assoc($result);
//says there is only one row
$total = count( mysqli_num_rows($result) );
echo $total."<br>";
I have tried many ways of breaking the data out of the result, I have modified the query in several ways, with group by's, counts, etc trying to break this out.
Fairly new to joins also so if this is ugly, it's because it was the first hack that didn't spit out 12 million results.