|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-08-13 16:12 UTC] shane
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 20:00:01 2025 UTC |
<? $testdb1 = odbc_connect("IntPhone","Gerhard","") || die("DIE FIEND, DIE!"); $testdb2 = odbc_connect("WebLog","SysDba","password") || die("DIE FIEND, DIE!"); print "test1 $testdb1<br>"; print "test2 $testdb2<br>"; ?> Results in both $testdb1 and $testdb2 having the value 1. The problem get real when on a page more than one database has to be opened like in: <? $testdb1 = odbc_connect("weblog","sysdba","password") || die("DIE FIEND, DIE!"); $res1 = odbc_exec($testdb1,"select count(distinct clienthost) from INETLOG"); print "Step 1, count: ".odbc_result($res1,1)."<br>"; odbc_close($testdb1) || die ("DIE close!"); $testdb2 = odbc_connect("weblog","sysdba","password") || die("DIE FIEND, DIE!"); $res2 = odbc_exec($testdb2,"select count(distinct target) from INETLOG"); print "Step 2, count: ".odbc_result($res2,1)."<br>"; odbc_close($testdb2); ?> Here the script gives an error on the line starting with $res2. if the 4th line and the 6th line are removed things are working again but it becomes very difficul to use different independant scripts on a single page. platform winNt, database Intrbase through ODBC, but also tested on a ODBC connection to a paradox database with the same results. PHP version 3.0.1 (the executable for download at the moment of writing.)