At 9:29 AM -0600 3/20/1999, Thomas R. Bedell wrote:
>Hello,
>
>Sorry about the stupid question. But I am a FNG to C and MySQL. But
>here goes>>>
>I am currently running Redhat 5.1, MySQL 3_22_20a, (I have installed
>Bench, Client and Devel packages also) and glibc-2_0_7-19.
>Now the stupid part:
>Can someone please provide the proper syntax to simply connect to MySQL.
>Assuming the Database is "test"? I assume, I would use
>MySQL_Real_Connect(). As you know, If the syntax is not exactly correct,
>I will get compile errors.
>Also, to avoid stupid questions in the future, can someone please point
>me to the proper C API manual for MySQL?
The C API is documented in the MySQL manual:
http://www.mysql.com/Manual_chapter/manual_toc.html
Take a look at chapter 18.
By the way, C is case sensitive. The call is mysql_real_connect(),
not MySQL_Real_Connect().
Also, I suggest you grab a source distribution of MySQL, even if you
don't care about installing it. You can take a look at the standard
MySQL clients (mysql, mysqladmin, mysqlshow, mysqldump, etc.) to see
how the C API is used in real programs.
--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/