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 MySQL shared object.
> 
> If I were to issue a count(*) query from my monitor interface:
> Example:
> mysql> select count(*) from clients;
> +----------+
> | count(*) |
> +----------+
> |       16 |
> +----------+
> 
> If "select count(*) from clients" is issued from the newlisp API, is
> there a a C API function that would return '16'?

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_fetch_lengths().  There's
a simple code fragment to print a resultset on this page:

http://dev.mysql.com/doc/refman/5.1/en/mysql-fetch-row.html

-- 
        Dan Nelson
        dnel...@allantgroup.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to