I fulfill the request:

$sql = "SELECT * FROM 'users' "; $stmt = con_pdo()->prepare("$sql"); 

I get the results:

 $rezult = $stmt->fetchAll; print_r($rezult); 

The page is clean, in table 3 entries. Trying to detect errors:

 print_r(con()->errorInfo()); 

Answer:

 Array ( [0] => 00000 [1] => [2] => ) 

I deduce

 print_r($stmt); PDOStatement Object ( [queryString] => SELECT * FROM 'users' ) 

What kind of magic?

  • It seems that there is no error. Maybe the record is not visible because of any invalid characters when outputting in html, for example < - Mike
  • The code 00000 means that there are no errors - u_mulder
  • And your problem is in quotes. - u_mulder
  • 2
    Where can I get an error from a request that no one else has performed? I do not see you have any execute. Well, fetchAll is a method, not a property. And here should be at least E_NOTICE. That is a big question to the configuration of error output. - Shallow
  • one
    More mistakes to god of mistakes. - u_mulder

0