I do extract a table, the table even has the correct number of rows. HOWEVER, ALL the rows have the same information: the first row, the one that indicates the headers ie: FirstName, Phone, Address, etc.
The code below shows just a bit how I am doing it. I reiterate, the mysqli connection is indeed extracting a table with data, with the correct row count. But I am not getting the correct info.
public function queryexec()
{
if(isset($this->query))
{
//execute prepared query and store in result variable.
$this->result = $this->connection->query($this->query);
echo 'Table Row Count: '. $this->result->num_rows;
echo '<br/>';
//fetch_array gives me table but only headers but correct amount of rows.
//Fetch_object doesnt work throws me error:
//Fatal error: Cannot use object of type stdClass as array
while($row = $this->result->fetch_array()){
printf ("%s (%s)\n", $row[0], $row[2][1]);
//echo 'Table Data: '. $newdata["LastName"];
//echo '<br/>';
}
return true;
}
return false;
}