Query result in MySQL Console does not match the result of PHP's mysql_query()

Urgernesogbag

New Member
My MySQL query returns different results depending on how the query is submitted. When the query is submitted through the MySQL Console results in.\[code\]mysql> SELECT `modx`.coverage_nation.id, -> `modx`.coverage_nation.name, -> `modx`.coverage_national_region.id, -> `modx`.coverage_national_region.name -> FROM `modx`.coverage_nation_part -> RIGHT JOIN `modx`.coverage_national_region ON (`modx`.coverage_nation_part.nation_regionID = `modx`.coverage_national_region.id) -> RIGHT JOIN `modx`.coverage_nation ON (`modx`.coverage_nation_part.nationID = `modx`.coverage_nation.id) -> ORDER BY `modx`.coverage_nation.name ASC, `modx`.coverage_national_region.name ASC;+----+---------------+------+------+| id | name | id | name |+----+---------------+------+------+| 3 | Canada | NULL | NULL || 18 | Chad | NULL | NULL || 17 | Germany | NULL | NULL || 15 | Italy | NULL | NULL || 2 | Mexico | NULL | NULL || 19 | Nigeria | NULL | NULL || 14 | Russia | NULL | NULL || 16 | Spain | NULL | NULL || 1 | United States | NULL | NULL |+----+---------------+------+------+9 rows in set (0.00 sec)\[/code\]When the same query is submitted using PHP's \[code\]mysql_query\[/code\] it returns only one row.\[code\]$query .= "SELECT `modx`.coverage_nation.id,`modx`.coverage_nation.name,`modx`.coverage_national_region.id,`modx`.coverage_national_region.nameFROM `modx`.coverage_nation_partRIGHT JOIN `modx`.coverage_national_region ON (`modx`.coverage_nation_part.nation_regionID = `modx`.coverage_national_region.id)RIGHT JOIN `modx`.coverage_nation ON (`modx`.coverage_nation_part.nationID = `modx`.coverage_nation.id)ORDER BY `modx`.coverage_nation.name ASC, `modx`.coverage_national_region.name ASC;";$resultSet = mysql_query($query) or die("query failed ".mysql_error());while($row = mysql_fetch_array($resultSet,MYSQL_NUM)) { // handle each result here}\[/code\]Returns only Canada. Does anyone have any ideas as to how I might solve this?
 
Back
Top