Pooly wrote:
2005/9/24, Lefteris Tsintjelis <[EMAIL PROTECTED]>:Hi, I have been searching for this for a while without finding a good answer. In the following example, MUST I call mysql_free_result() in case mysql_store_result(sql)==NULL or not? Is the following valid in case of NULL? query="update/insert ..." if (mysql_query(sql,query)!=0) return(-1); if(mysql_store_result(sql)==NULL) return(0); else { ... }if you do that, you don't retrieve your result since you don't set any variable with it if ( (res = mysql_store_result(...))==NULL ){ //no result set (update,delete, insert, wrong select...) return 0; if ( res ){ mysql_free_result(res); res = NULL; }
Yes, absolutly right, I left the "res = ..." part out. Thank you -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
