Re: C API Function for count(*)

2010-05-15 Thread Tim Johnson
* Bob Cole [100515 06:58]: > You might get closer to what you want if you put your command in a text file > and run it from the command line. > On a Mac OS X, I put a similar command: > select count(*) from testTable; > into a small text file: > testCount.txt > and ran this command fro

Re: C API Function for count(*)

2010-05-15 Thread Tim Johnson
* Dan Nelson [100514 21:38]: > > You can't do it with one function call, but you can do it, since the MySQL > cli was able to print "16" in your example above, and it was written in C. > Take a look at mysql_store_result(), mysql_num_fields(), > mysql_field_count(), mysql_fetch_row(), and mysql_

Re: C API Function for count(*)

2010-05-15 Thread Bob Cole
You might get closer to what you want if you put your command in a text file and run it from the command line. On a Mac OS X, I put a similar command: select count(*) from testTable; into a small text file: testCount.txt and ran this command from the Terminal: mysql -u username -pp

Re: C API Function for count(*)

2010-05-14 Thread Dan Nelson
In the last episode (May 14), Tim Johnson said: > I have MySQL version 5.0.84 on linux slackware 13.0 32-bit. > > I am working with a relatively new API written in a programming language > with a small user base (newlisp). The newlisp API imports a number of C > API functions from the system My

C API Function for count(*)

2010-05-14 Thread Tim Johnson
I have MySQL version 5.0.84 on linux slackware 13.0 32-bit. I am working with a relatively new API written in a programming language with a small user base (newlisp). The newlisp API imports a number of C API functions from the system MySQL shared object. If I were to issue a count(*) query fr