My Current code outputs the same ID twice.
The rid column in my db contains 1,2,3,4,5 But my code outputs_
Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 2 [4] => 3 [5] => 3 [6] => 4 [7] => 4 [8] => 5 [9] => 5 )
I don't know the reason for this and am therefor asking you guys for help.
CODE:
Code: Select all
$mydb = "SELECT * FROM research, economy";
$res = $db->dbquery($mydb);
while($array = $db->fetchArray($res)){
$ptf = $array['pointstofinish'];
$rid[] = $array['rid'];
$Research[] = $array['name'];
}
Thomas