[asterisk-dev] MySQL(Fetch) Not setting fetchid to 0 if no rows found

S McGowan madprofzero at yahoo.com
Wed Mar 8 06:00:01 MST 2006


Greets all, 

Been a while since I posted to the -dev list, but this is definitely a
developers question. I googled the issue, searched my archive of the -users and
-dev list, but found that everything written is contrary to the following issue,
which is showing up on my 1.2.1 server:

When running the MYSQL() app, I run my query and then fetch it, as per normal
operation. My client then has me creating a ${RETURNCODE} variable based on if
${FETCHID} is 0 or 1, to see if the row returned anything or not. (I know, it
could have just been done by checking for null value in the var, but it's how
they're doing it).

The problem is that apparently ${FETCHID} is 1 even when no rows were
fetched....Any thoughts/insights on this?

Thanks,

SKM




More information about the asterisk-dev mailing list