Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- how to get data out of mysql
December 23, 2005, 2:01 pm
rate this thread
read data from mysql and put to parameters in my program.
I use c api to program. In c api there seems to have many api to query
the database. but can't find one to get data out of the database.
can someone tell me how ? or just tell me which api I should use .
thanks a lot!
Re: how to get data out of mysql
First take a look at the MySQL C API function overview and description,
everything you are looking for is there:
Basically these are thes teps you need to take:
- connect to the database using mysql_connect() or mysql_real_connect()
- execute your query using mysql_query() or mysql_real_query()
- process your results
- free your dataset using mysql_free_result()
- close the connection using mysql_close()
Take a look at these tutorials to give you an idea:
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum