1

this is my code:

$pdo = new PDO($dsn, $user, $pass);
$q = "SELECT C1,C2,C3 FROM table";
$stmt = $pdo->query($q);
$nums = $stmt->rowCount();

echo "Count: ".$nums."<br>";
$erg = $stmt->fetchAll();
print_r($erg)

And the result is:

Count: 972<br>
Array()

And I have absolutly no idea what's wrong. RowCount is correct. I use same in an other project where it works as expected, and I can't see any difference.

Any idea what an how to check?

Thanks

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Fabian Knauf
  • 117
  • 8

0 Answers0