Skip to Content.
Sympa Menu

freetds - Error checking with FreeTDS (cvs as of may), PHP3 and MS-SQL

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Karl Pielorz <kpielorz AT tdx.co.uk>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Error checking with FreeTDS (cvs as of may), PHP3 and MS-SQL
  • Date: Wed, 21 Jun 2000 19:14:18 +0100


Hi,

I'm running FreeTDS 0.50 (cvs version, cvsupd in late may), with PHP
v3(.something) and MS SQL Server 7. PHP is compiled with "--with-sybase"

I understand (and have posted before, but can't remember getting a reply) that
the error handling with this is a little 'weird' as the errors aren't passed
back to the client in the 'normal' way?

Anyway, if I run the following from PHP, it can't detect the error... Is there
a way of catching the error?

$qTemp = sybase_query( "SEFECT bits FROM tables" );
if( $qTemp == false ){
echo( "<P>An SQL error occured</P>" );
exit();
}


Generates a PHP "Warning", but doesn't run the code to 'handle' the error (in
it's crude form).

Is there a work around for this? - Or am I using the wrong code, or wrong way
of detecting an error...

[My appologies if this is a 'sybase under PHPism', and not a FreeTDS thing]

Thanks,

-Karl



  • Error checking with FreeTDS (cvs as of may), PHP3 and MS-SQL, Karl Pielorz, 06/21/2000

Archive powered by MHonArc 2.6.24.

Top of Page