PHP4 ODBC problems
| From: | Adham Shaaban | Date: | Thu, 25 May 2000 11:18:24 +0000 |
| Subject: | PHP4 ODBC problems | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-99@lists.php.net to get a copy of this message | ||
I just installed PHP4 yesterday and I tried to switch
over my PHP3 stuff but I'm getting a strange ODBC
problem. I have a WebDB class that encapsulates my
database functions. In my exec() function I have:
if (!($rs = odbc_exec($this->db, $sql))) {
errorMessage("Database Error! ");
return 0;
}
Earlier on, in my connect() function, I have:
$this->db =
odbc_connect($this->dsn,$this->user,$this->pass) ||
die("Unable to Connect to Database as $this->user ");
This works perfectly fine with PHP 3.0.11 but with
PHP4 I get:
Warning: Supplied argument is not a valid ODBC-Link
resource in webdb.inc on line 48
refering to the odbc_exec() call in my exec()
function.
I'm running PHP4 ISAPI with the Optimizer on NT4/IIS4.
Has anyone encountered similar problems?
Yr help is greatly appreciated!
Adham
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/