Connecting Tech Pros Worldwide Help | Site Map

Problems with SELECT

  #1  
Old July 18th, 2007, 08:15 AM
richard@dogcreek.ca
Guest
 
Posts: n/a
I am having a problem with SELECT. The table has 3 rows. I am using
the C api. Here is my C code.

count = mysql_query(my_db, "SELECT * FROM accounts");
er = mysql_error(my_db);
res = mysql_use_result(my_db);
num_row = mysql_num_rows(res);

count is returned as 0 (no error)
er is NULL (no error)
res is trturned valid
num_row is returned as 0

I have full permissions to the data base and its tables. I can retrieve
data from other tables in the database.

Does any one have an idea as to what is amiss here. I can add to the
table and get the correct error when I try to add or update the table
with duplicate key fields.

Thanks Richard

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with select statement ProgrammingStudent answers 1 March 5th, 2008 06:57 PM
Problems with Select statement! gggram2000 answers 4 December 28th, 2007 04:25 PM
problems with select ( ) function Sonbol answers 0 September 15th, 2007 11:02 PM
a small problems with Select and Auto Copy Koman \( Hong Kong \) answers 1 July 23rd, 2005 04:09 PM