Dave,
The documentation has several examples. Here's a function we use. Are
you having a particular difficulty?
Regards,
Andy.
MYSQL *aDb = NULL;
int xConnect()
{
#define MYSQL_HOST "192.168.103.112" // or host name
#define MYSQL_DB"foodb" // database n
anyone have a good sample script of connecting mysql from C API? thanks
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
kenneth johansen writes:
> hello everybody.
> Ive been working with perl and mysql for some time, but recently i had
> to move over
> to C and as such i wrote a small test program, just to get to know the
> mysql C API.
> Well, things didnt go as i thought. i kept getting linking problems
> and in
kenneth johansen wrote:
}
> +
>
> i compile this with:
> gcc -I/usr/local/mysql/include/ -L/usr/local/mysql/lib/ program.c
> -lmysqlclient
>
add -lz
--
Gerald L. Clark
[EMAIL PROTECTED]
--
hello everybody.
Ive been working with perl and mysql for some time, but recently i had
to move over
to C and as such i wrote a small test program, just to get to know the
mysql C API.
Well, things didnt go as i thought. i kept getting linking problems
and in the end my test program was limited to