In the index used in the prepared query / statement

1

I have a strange warning in my code, when it has only one data in the DB it recognizes and works fine, but when I enter more than 1 data in the DB it shows me the following warning:

  SELECT * FROM con_users "SELECT * FROM con_users"

To make the query in phpmyadmin I used the following code:

<?php

include_once 'includes/settings.php';
require_once 'includes/autoloader.php';

$querys = $db->Execute("SELECT * FROM con_users");

while($ln = $db->FetchArray($querys)) {

    $id = $ln['id'];
    $nome = $ln['nome'];
    $lastname = $ln['lastname'];

}

echo 'id: '.$id.'<br/>';
echo 'nome: '.$nome.'<br/>';
echo 'sobrenome: '.$lastname.'<br/>';?>

Well, who can help me, thank you ...

    
asked by anonymous 27.04.2015 / 06:17

1 answer

1

Second this answer from SOen you should change the strictness level of mysqli_report from: MYSQLI_REPORT_ALL to: MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT , so the extension will not report warnings about indexes in general.

    
27.04.2015 / 12:27