![Picture of Graham Moy Picture of Graham Moy](/graphics/unknown.gif)
Graham Moy - 2017-04-01 14:09:32
I've added a table 'roster' to the database and am using the $this->query() to access it. The table contains the following:
id player team
116 6 2
117 6 3
118 3 5
When running query:
$parameters = array(
'i', 0
);
$result_types = array( 'i');
$this->Query('SELECT id FROM roster WHERE player <> ?', $parameters, $results, $result_types)
$results contains:
Array ( [0] => Array ( [0] => Array ( [0] => 118 ) [1] => Array ( [0] => 118 ) [2] => Array ( [0] => 118 ) ) )
I was expecting:
Array ( [0] => Array ( [0] => Array ( [0] => 116 ) [1] => Array ( [0] => 117 ) [2] => Array ( [0] => 118 ) ) )
It seems to return the correct number of rows, 3 in this case, but populate all rows with the data from the last returned row! What am I doing wrong here? Many thanks in advance for your help.
Graham.