Curso de MySQL
Consultas, lista de correo 'C++ Con Clase' 'MySQL Con Clase' página de entrada Tabla de contenido Contactar con Webmaster
Curso Sentencias Funciones API C

API C

Funciones API C

mysql_affected_rows mysql_autocommit mysql_change_user mysql_character_set_name mysql_close mysql_commit mysql_connect mysql_create_db mysql_data_seek mysql_debug mysql_drop_db mysql_dump_debug_info mysql_eof mysql_errno mysql_error mysql_escape_string mysql_fetch_field mysql_fetch_fields mysql_fetch_field_direct mysql_fetch_lengths mysql_fetch_row mysql_field_count mysql_field_seek mysql_field_tell mysql_free_result mysql_get_client_info mysql_get_client_version mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_get_server_version mysql_hex_string mysql_info mysql_init mysql_insert_id mysql_kill mysql_library_end mysql_library_init mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_more_results mysql_next_result mysql_num_fields mysql_num_rows mysql_options mysql_ping mysql_query mysql_real_connect mysql_real_escape_string mysql_real_query mysql_reload mysql_rollback mysql_row_seek mysql_row_tell mysql_select_db mysql_set_server_option mysql_shutdown mysql_sqlstate mysql_ssl_set mysql_stat mysql_store_result mysql_thread_id mysql_use_result mysql_warning_count

Tipos API C

MYSQL_DATA MYSQL_FIELD MYSQL_RES MYSQL_ROW MYSQL_ROWS

Tipo MYSQL

typedef struct st_mysql {
  NET		net;			/* Communication parameters */
  gptr		connector_fd;		/* ConnectorFd for SSL */
  char		*host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
  char          *db;
  struct charset_info_st *charset;
  MYSQL_FIELD	*fields;
  MEM_ROOT	field_alloc;
  my_ulonglong affected_rows;
  my_ulonglong insert_id;		/* id if insert on table with NEXTNR */
  my_ulonglong extra_info;		/* Used by mysqlshow */
  unsigned long thread_id;		/* Id for connection in server */
  unsigned long packet_length;
  unsigned int	port;
  unsigned long client_flag,server_capabilities;
  unsigned int	protocol_version;
  unsigned int	field_count;
  unsigned int 	server_status;
  unsigned int  server_language;
  unsigned int	warning_count;
  struct st_mysql_options options;
  enum mysql_status status;
  my_bool	free_me;		/* If free in mysql_close */
  my_bool	reconnect;		/* set to 1 if automatic reconnect */

  /* session-wide random string */
  char	        scramble[SCRAMBLE_LENGTH+1];

 /*
   Set if this is the original connection, not a master or a slave we have
   added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
 */
  my_bool rpl_pivot;
  /*
    Pointers to the master, and the next slave connections, points to
    itself if lone connection.
  */
  struct st_mysql* master, *next_slave;

  struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
 /* needed for send/read/store/use result to work correctly with replication */
  struct st_mysql* last_used_con;

  LIST  *stmts;                     /* list of all statements */
  const struct st_mysql_methods *methods;
  void *thd;
  /*
    Points to boolean flag in MYSQL_RES  or MYSQL_STMT. We set this flag 
    from mysql_stmt_close if close had to cancel result set of this object.
  */
  my_bool *unbuffered_fetch_owner;
} MYSQL;