mysql_num_rows
Posted by: Bernhard Graaf
Date: February 12, 2011 12:54PM

Hi,

I have a problem with the command: mysql_num_rows(). The C-code looks like this:

sprintf(tmp_str,"SELECT * from adapter");
mysql_query(my,tmp_str);
my_result = mysql_use_result(my);
num_rows = mysql_num_rows(my_result);
printf("Anzahl Datens├Ątze: %i\n", num_rows);

I'll got every time a counter with 0, but I have 4 Datasets in my table.
What's wrong in my code?
What I need is the number of entries in my table.

Thanks for help!

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql_num_rows
1146
February 12, 2011 12:54PM
667
February 12, 2011 02:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.