Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux Ï ÓÃcÓïÑÔ´´½¨mysqlÊý¾Ý¿â±Ê¼Ç£¨¶þ£©

linux Ï ÓÃcÓïÑÔ´´½¨mysqlÊý¾Ý¿â±Ê¼Ç£¨¶þ£©
                       
£­£­£­£­£­£­£­Á½¸ö¼òµ¥µÄÀý×Ó£¬¹©²Î¿¼±È½Ï
¡¶ÀýÒ»¡·
#include <stdio.h>
#include <stdlib.h>
#include
"/usr/include/mysql/mysql.h"      
int main(){
MYSQL my_connection;
int res;
mysql_init(&my_connection);
if(mysql_real_connect(&my_connection,"localhost","root","123","data",0,NULL,CLIENT_FOUND_ROWS)){
printf("connection success\n");
res= mysql_query(&my_connection,"select * from
ip");
  if(!res){
     
printf("%lu",(unsigned
long)mysql_affected_rows(&my_connection));
}
  else{
   fprintf(stderr,"insert error
%d:%s\n",mysql_errno(&my_connection),
mysql_error(&my_connection));
}
 
mysql_close(&my_connection);
}
else{
   fprintf(stderr,"connection
Failed\n");
 
if(mysql_errno(&my_connection)){
   fprintf(stderr,"insert error
%d:%s\n",mysql_errno(&my_connection),
mysql_error(&my_connection));
}
}
 return EXIT_SUCCESS;
}
±àÒ룺
 gcc -o mysql.out mysql.c -L /usr/lib/mysql/ -l
mysqlclient
¡¶Àý¶þ¡·
#include<stdio.h>
#include<stdlib.h>
#include"/usr/include/mysql/mysql.h"      
int main(int argc,char**argv)
{
    MYSQL
*sql_p;
    MYSQL_RES
*result_p;
    MYSQL_ROW
row_p;
    int
res;
   
sql_p=mysql_init(NULL);
   
if(sql_p==NULL){
       
printf("Init error!\n");
       
exit(1);
    }
   
sql_p=mysql_real_connec


Ïà¹ØÎĵµ£º

MYSQLµÄ×Ö·û¼¯——×Ö·û¼¯ºÍУ¶Ô¹æÔò


1.ʲô½Ð×ö×Ö·û¼¯
×Ö·û¼¯¾ÍÊÇÒ»Ì×·ûºÅºÍ×Ö·û±àÂëµÄ¼¯ºÏ¡£
2.ʲô½Ð×öУ¶Ô¹æÔò
У¶Ô¹æÔò¾ÍÊÇÔÚ×Ö·û¼¯ÄÚÓÃÓڱȽÏ×Ö·ûµÄÒ»Ì×¹æÔò¡£
MYSQL5.1Êý¾Ý¿â¿ÉÒÔ×öµ½
·  Ê¹ÓöàÖÖ×Ö·û¼¯À´´æ´¢×Ö·û´®
·  Ê¹ÓöàÖÖУ¶Ô¹æÔòÀ´±È½Ï×Ö·û´®
·  ÔÚͬһ̨·þÎñÆ÷¡¢Í¬Ò»¸öÊý¾Ý¿â»òÉõ ......

mysql ·Ö×é»ã×Ü

 1.´´½¨±í£º
    create table groupTable(dept varchar(6),phone varchar(20),amount int);
 2.²åÈë²âÊÔÊý¾Ý£º
    insert groupTable
    select 'ÓªÒµ²¿',8001,20 union all
    select 'ÓªÒµ²¿',8002,30 union all
    se ......

blogÔ´ÂëÕûÀí£ºphp+mysql²©¿Í³ÌÐò25ÖÖ

Blogϵͳ×÷Ϊ´ó¼Ò×î³£½Ó´¥µÄ»¥ÁªÍø¶«¶«£¬ÔÚÕ¾³¤ÈºÌåÖм¸ºõÈËÊÖÒ»²©£¬´ÓÖªÃûÃÅ»§µÄ²©¿ÍƵµÀ£¬µ½ÍøÂçÓªÏúר¼Ò²©¿Í£¬ÍøÃñ¶Ô²©¿ÍµÄ¹Ø×¢¶ÈÔÚ²»¶ÏÌá¸ß²¢É¡£Ä¿Ç°ÍøÉÏÃâ·ÑµÄblogϵͳ̫ÔÓ£¬ÔÚ´ËÕûÀíPHP°æµÄBlog½éÉÜÈçÏ£º
1¡¢wordpress:http://www.wordpress.org ¹¦ÄÜÒ²ºÜÈ«Ã棬Ӧ¸ÃÊÇÖ§³ÖblogµÄÊ×Ñ¡¡£ËüÓÐ×îÇ¿µÄÄ£°æ¹¦ÄÜ£¬ÒѾ­ ......

java µ÷ÓÃmysql¿Í»§¶Ëµ¼È룬µ¼³öÊý¾Ý

 ×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë 
/**  
 * µ¼ÈëÊý¾Ý  
  * @param  ½Å±¾µÄµØÖ·ºÍÃû³Æ  
 * @return ÊÇ·ñ³ ......

ÈçºÎʹÓÃMySQLÌáÉýȨÏÞ


Ç°²»¾ÃÍøÉϹ«¿ªÁËÒ»¸öMySQL FuncµÄ©¶´,½²µÄÊÇʹÓÃMySQL´´½¨Ò»¸ö×Ô¶¨ÒåµÄº¯Êý,È»ºóͨ¹ýÕâ¸öº¯ÊýÀ´¹¥»÷·þÎñÆ÷¡£×îÔç¿´µ½Ïà¹ØµÄ±¨µÀÊÇÔÚo-otikÉÏ,µ«Êǹ«²¼µÄÊÇÕë¶Ô UnixϵͳµÄExploit,²¢Çҳɹ¦ÂÊÒ²²»ÊǺܸß.¶ø½üÆÚ,¹úÄÚÓиßÊַųöÕë¶ÔWinϵͳµÄÏà¹ØÎÄÕÂ,ÓÚÊÇÎÒÂíÉÏÕÒÀ´ÓëÅóÓÑһͬÑо¿.
ÆäʵÎÒÃÇÔç¾ÍÄÜÏëµ½.µ±ÎÒÃÇÔÚ¶ÔMSSQL ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ