Re: [PHP-DB] PHP4 MSSQL Error handling

2002-07-25 Thread Adam Voigt
$result = mssql_query($query) or die(mssql_get_last_message()); Adam Voigt [EMAIL PROTECTED] On Wed, 2002-07-24 at 19:48, Salve Tinkerworth wrote: > Does anyone have any good tips for error handling? I've tried different > methods to retrieve good error information from mssql_query but nothing >

Re: [PHP-DB] PHP4 MSSQL Error handling

2002-07-24 Thread Salve Tinkerworth
This is what was there before I tried to replace it: $sql2=mssql_query($sql2) or die ('failed inserting OPS'); This didn't work. It died everytime even though I could run the statement in $sql2 in query analyzer without any problems. I inherited this thing but I'm having fun learning PHP. :-)

Re: [PHP-DB] PHP4 MSSQL Error handling

2002-07-24 Thread Doug Durham
Oops! Sorry all, wrong db. At 05:05 PM 7/24/2002 -0700, Doug Durham wrote: >$result=mssql_query($sql2)or die("sql2 failed" . mysql_errno() . ": " >. mysql_error()); > >At 04:48 PM 7/24/2002 -0700, Salve Tinkerworth wrote: >>Does anyone have any good tips for error handling? I've tried different

Re: [PHP-DB] PHP4 MSSQL Error handling

2002-07-24 Thread Doug Durham
$result=mssql_query($sql2)or die("sql2 failed" . mysql_errno() . ": " . mysql_error()); At 04:48 PM 7/24/2002 -0700, Salve Tinkerworth wrote: >Does anyone have any good tips for error handling? I've tried different >methods to retrieve good error information from mssql_query but nothing >seems t

[PHP-DB] PHP4 MSSQL Error handling

2002-07-24 Thread Salve Tinkerworth
Does anyone have any good tips for error handling? I've tried different methods to retrieve good error information from mssql_query but nothing seems to be working. Here's the latest attempt: $result=mssql_query($sql2); $result=mssql_query('SELECT @@ERROR As ErrorCode'); $error=mssql_fetch_row($