- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mysql source
Operating System - HP-UX
1753701
Members
4962
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2003 08:40 PM
тАО06-29-2003 08:40 PM
mysql source
hi all!
does anyone know which file in the mysql source provides a listener class or that supports extensibility.
does anyone know which file in the mysql source provides a listener class or that supports extensibility.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2003 01:23 AM
тАО06-30-2003 01:23 AM
Re: mysql source
HI,
What do you mean by listener class ??
in order to access mysql from your own program (C,C++), you have the libmysqlclient which provide apis.
regards
Benoit
What do you mean by listener class ??
in order to access mysql from your own program (C,C++), you have the libmysqlclient which provide apis.
regards
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2003 03:01 AM
тАО06-30-2003 03:01 AM
Re: mysql source
can u be more precise . does this take me to the core of database server
can u provide me an example
can u provide me an example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2003 04:33 AM
тАО06-30-2003 04:33 AM
Re: mysql source
Hi, here is a very simple program to connect to the database "mybase", hosted on "mysqlhost", connection on default port (3306), uding user "user" with password "password" .
this program connect to this database, query select * from lot and print the first 4 columns of the result.
/* a simple demo client */
#include
#include
#include
#include
#include
int
main(void)
{
MYSQL mysql;
MYSQL_RES *res;
MYSQL_ROW row;
assert(mysql_init(&mysql) != NULL);
/* this only works in 3.23 */
assert(mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "simple") == 0);
if (mysql_real_connect(&mysql, "mysqlhost", "user", "password", "mybase", 0, NULL, 0) == NULL) {
fprintf(stderr, "error on connect: %s\n", mysql_error(&mysql));
exit(EXIT_FAILURE);
}
if (mysql_real_query(&mysql, "select * from lot", 17) != 0) {
fprintf(stderr, "error on query: %s\n", mysql_error(&mysql));
exit(EXIT_FAILURE);
}
if ((res = mysql_store_result(&mysql)) == NULL) {
fprintf(stderr, "error on store: %s\n", mysql_error(&mysql));
exit(EXIT_FAILURE);
}
printf("resultat:\n");
while ((row = mysql_fetch_row(res))) {
printf(" %s %s %s %s\n", row[0],row[1],row[2],row[3]);
}
mysql_free_result(res);
mysql_close(&mysql);
exit(EXIT_SUCCESS);
}
this program connect to this database, query select * from lot and print the first 4 columns of the result.
/* a simple demo client */
#include
#include
#include
#include
#include
int
main(void)
{
MYSQL mysql;
MYSQL_RES *res;
MYSQL_ROW row;
assert(mysql_init(&mysql) != NULL);
/* this only works in 3.23 */
assert(mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "simple") == 0);
if (mysql_real_connect(&mysql, "mysqlhost", "user", "password", "mybase", 0, NULL, 0) == NULL) {
fprintf(stderr, "error on connect: %s\n", mysql_error(&mysql));
exit(EXIT_FAILURE);
}
if (mysql_real_query(&mysql, "select * from lot", 17) != 0) {
fprintf(stderr, "error on query: %s\n", mysql_error(&mysql));
exit(EXIT_FAILURE);
}
if ((res = mysql_store_result(&mysql)) == NULL) {
fprintf(stderr, "error on store: %s\n", mysql_error(&mysql));
exit(EXIT_FAILURE);
}
printf("resultat:\n");
while ((row = mysql_fetch_row(res))) {
printf(" %s %s %s %s\n", row[0],row[1],row[2],row[3]);
}
mysql_free_result(res);
mysql_close(&mysql);
exit(EXIT_SUCCESS);
}
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP