mysql returns


I have been trying to determine row effected in an update query. The code that I used is:
function DoTest(){
$qry="UPDATE ib SET close='99' WHERE symbol='MCD'";
$result = mysql_query($qry) or die ("qry in dotest failed ".mysql_error());
if($result)
Msg2User("Query is true");
else
Msg2User("Query is false");
Msg2User ("Number or rows affected is ".mysql_affected_rows($result));
}

It makes no difference whether the symbol (MCD) is in the table or not. I get the Query is true and the line with the Msg2User on affected rows says that the link resource is invalid. the update gets done but how do I know
Posted On: Monday 31st of December 2012 01:48:41 AM Total Views:  233
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE