mssql_get_last_message(), or if that doesn't return anything useful, try
this code from a PHP manual user note:

function get_sql_error ($con) {
   
       $sql    = "select @@ERROR as code";
       $result = mssql_query($sql, $con);
       $row    = mssql_fetch_array($result);
       $code  = $row["code"]; // error code
       $sql     = "select cast (description as varchar(255)) as errtxt
from master.dbo.sysmessages where error = $code and msglangid = 1031";
// german
       $result = mssql_query($sql, $con);
       $row    = mssql_fetch_array($result);
       if ($row)
           $text   = $row["errtxt"]; // error text (with placeholders)
       else
           $text   = "onknown error";
       mssql_free_result($result);
       return "[$code] $text";
   }

Tom

-----Original Message-----
From: Alf Stockton [mailto:[EMAIL PROTECTED] 
Sent: 29 September 2006 13:11
To: DvDmanDT
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] insert md5 password

DvDmanDT wrote:
> Just check why it fails.. mysql_error() returns a string with the last
error 
> message..
>
>   
Unfortunately this is mssql not mysql......:-(

-- 
Regards,
Alf Stockton            www.stockton.co.za
 
You'll never see all the places, or read all the books, but fortunately,
they're not all recommended.
My email disclaimer is available at www.stockton.co.za/disclaimer.html

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to