Error Handling Problems
| From: | Flint Doungchak | Date: | Thu, 05 Oct 2000 19:44:02 +0000 |
| Subject: | Error Handling Problems | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2961@lists.php.net to get a copy of this message | ||
Hello,
I've recently switched over to SQL Server from MySQL. I have an error
handling problem. Normally, when my result set returns null, I can print an
error message or whatever. For instance:
$query = "INSERT INTO team_question (team,question)
select $teamid as team, question.id from question where question.quest =
$questid and active = 1";
$result = mssql_query($query,$connect);
if (!$result) fError("S002",$PATH_INFO,"");
If the query fails for whatever reason, I could do something via my if
statement. However, right now, if the query fails, the script dies and
prints error messages. I don't want that. Can someone help me with what I
know is a simple problem.
Thanks,
-Flint
_________________________________________________
Flint Doungchak, President
Net Solutions, LLC
840 Lawrence Street
Eugene, OR 97401
flint@netsolutionsllc.com
Voice +1 541 345-7087
Fax +1 541 485-5519
http://www.netsolutionsllc.com