Re: mysql problem
From: Fatted (obeseted_at_yahoo.com)
Date: 09/23/04
- Next message: John Bode: "Re: calling fopen using function"
- Previous message: Joona I Palaste: "Re: ++i vs i++"
- In reply to: Alfredo: "mysql problem"
- Next in thread: Default User: "Re: mysql problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Sep 2004 15:47:24 +0200
Alfredo wrote:
<snip>
> Everything works ok until I do
> res = mysql_store_result(conn);
>
> if (res)
>
> Thus, res becomes null. Why?
>
Check out:
http://dev.mysql.com/doc/mysql/en/mysql_store_result.html
<quote>
mysql_store_result() also returns a null pointer if reading of the
result set failed. You can check whether an error occurred by checking
if mysql_error() returns a non-empty string, if mysql_errno() returns
non-zero, or if mysql_field_count() returns zero.
An empty result set is returned if there are no rows returned. (An empty
result set differs from a null pointer as a return value.)
</quote>
Some additional debugging code may be required...
- Next message: John Bode: "Re: calling fopen using function"
- Previous message: Joona I Palaste: "Re: ++i vs i++"
- In reply to: Alfredo: "mysql problem"
- Next in thread: Default User: "Re: mysql problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|