summaryrefslogtreecommitdiff
path: root/tests/odbc-display.php
diff options
context:
space:
mode:
authorAndreas Karajannis <kara@php.net>2000-05-28 12:50:19 +0000
committerAndreas Karajannis <kara@php.net>2000-05-28 12:50:19 +0000
commit1e949e6caa61f6a0c33ae5241056007226108021 (patch)
treebc38f0c690bd0fe3ca1f5e94ccc044258b529cae /tests/odbc-display.php
parente50b33c2402d53fc7b1ead9444e09d420d0c7b7c (diff)
downloadphp-git-1e949e6caa61f6a0c33ae5241056007226108021.tar.gz
Test scripts for ODBC added
Diffstat (limited to 'tests/odbc-display.php')
-rw-r--r--tests/odbc-display.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/odbc-display.php b/tests/odbc-display.php
new file mode 100644
index 0000000000..f79a854aea
--- /dev/null
+++ b/tests/odbc-display.php
@@ -0,0 +1,19 @@
+<?php
+ if(($conn = odbc_connect($dsn, $dbuser, $dbpwd))){
+ if(($res = odbc_do($conn, "select gif from php_test where id='$id'"))){
+ odbc_binmode($res, 0);
+ odbc_longreadlen($res, 0);
+ if(odbc_fetch_row($res)){
+ header("content-type: image/gif");
+ odbc_result($res, 1);
+ exit;
+ }else{
+ echo "Error in odbc_fetch_row";
+ }
+ } else {
+ echo "Error in odbc_do";
+ }
+ } else {
+ echo "Error in odbc_connect";
+ }
+?>