Skip to content

Instantly share code, notes, and snippets.

@mariuz
Created May 23, 2011 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariuz/987176 to your computer and use it in GitHub Desktop.
Save mariuz/987176 to your computer and use it in GitHub Desktop.
fetch one row complete , observe that column name is uppercase and reponse in my case from the firebird server is 42
<?php
$str_conn="firebird:host=localhost;dbname=/var/lib/firebird/2.5/data/employee.fdb;charset=UTF8";
$connection = new PDO($str_conn, "sysdba", "masterkey");
$sql = 'select count(*) from employee';
$count = $connection->query($sql);
$row=$count->fetch();
echo $row['COUNT'];
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment