summaryrefslogtreecommitdiff
path: root/ext/pdo_dblib/db.php
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2005-01-17 01:15:14 +0000
committerWez Furlong <wez@php.net>2005-01-17 01:15:14 +0000
commitca988059354fcee51c6306ff5056fe16b3081f58 (patch)
tree5e95571838b75ca5fe5c77db424b92b2700a7a2b /ext/pdo_dblib/db.php
parentf3d39ff406787514bb36927c0b97979c066f5d5d (diff)
downloadphp-git-ca988059354fcee51c6306ff5056fe16b3081f58.tar.gz
Add a PDO driver for Sybase style DB-lib (including MS SQL).
Only the basics are here right now.
Diffstat (limited to 'ext/pdo_dblib/db.php')
-rw-r--r--ext/pdo_dblib/db.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/pdo_dblib/db.php b/ext/pdo_dblib/db.php
new file mode 100644
index 0000000000..f069c76391
--- /dev/null
+++ b/ext/pdo_dblib/db.php
@@ -0,0 +1,24 @@
+<?php
+
+/* assumes that you have the freetds db.lib on windows */
+
+dl('php_pdo.dll');
+dl('php_pdo_sybase.dll');
+
+$db = new PDO('sybase:', 'pdo', 'pdo');
+debug_zval_dump($db);
+
+$stmt = $db->prepare('sp_helpdb');
+debug_zval_dump($stmt);
+
+$x = $stmt->execute();
+debug_zval_dump($x);
+
+while (($r = $stmt->fetch())) {
+ print_r($r);
+}
+
+$stmt = null;
+$db = null;
+echo "All done\n";
+?>