>>>>> "Scott" == Scott Hess <scott@stripped> writes:
Scott> I guess I'm still finding the documentation confusing, then. Section
Scott> 20.4.50 strongly implies that the way to distinguish whether a NULL result
Scott> from mysql_store_result() means there was an error, or an empty result set,
Scott> is to use mysql_num_fields(). But, you're indicating the mysql_num_fields()
Scott> will return 0 if there was either an error or an empty result set, so it
Scott> does _not_ provide a way to distinguish between those two cases. Is the
Scott> documentation wrong, or am I just thinking about it the wrong way?
Scott> I can see how you might use mysql_num_fields() to distinguish between the
Scott> results of, say, and INSERT statement, and a SELECT statement that returned
Scott> no rows (in the first case, the result set is NULL, and mysql_num_fields()
Scott> returns 0. In the second case, the result set is NULL, and
Scott> mysql_num_fields() returns the number of fields in the SELECT. Or at least
Scott> that's what I'd expect to happen).
The manual was wrong, I am now updated it!.
Scott> [BTW, I'm just checking the error. I don't _want_ to use mysql_num_fields()
Scott> instead, I just want to figure out if the documentation on this point is
Scott> wrong, or if I'm missing something.]
In this case, just check mysql_errno() !