RE: Really Super Dumb MSSQL (NOTE: Microsoft SQL) Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From the php.net page for the mssql_query function:

Returns: A positive MS SQL result identifier on success, TRUE if no rows
were returned, or FALSE on error.  

You should be able to wrap the function itself in an if statement easily
enough.

-M

> -----Original Message-----
> From: Ron.Herhuth@xxxxxxxxxxxxxxxxx 
> [mailto:Ron.Herhuth@xxxxxxxxxxxxxxxxx] 
> Sent: Wednesday, January 19, 2005 10:20 AM
> To: php-windows@xxxxxxxxxxxxx
> Subject:  Really Super Dumb MSSQL (NOTE: Microsoft 
> SQL) Question
> 
> 
> I feel stupid asking this but I did a quick search and 
> couldn't find an answer.
> 
> When I write a simple query to query MSSQL...is there a 
> simple way to know if the query executed without error?  I'm 
> looking to do a simple if then statment to inform the user if 
> the database information was added successfully to the database.
> 
> if I do an:
> 
> echo $result = mssql_query($query);
> 
> I get a resource ID... is it safe to assume that if a 
> resourceID is returned that I can print a success message?
> 
> Ron
> 
> 
> 
> 
> 
> 

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux