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

mysql×Ô¶¯Ôö³¤µÄÎÊÌâ,ÈçºÎ»Ö¸´´Ó1¿ªÊ¼

ÔÚÒ»¸ö±íÖÐÎÒÉèÖõ½autoidΪ×Ô¶¯Ôö³¤ÁÐ
ÀýÈçÓÐÈçÏÂÊý¾Ý

1 ÕÅÈý ÄÐ 20
2 ÍõÎå ÄÐ 22
3 ÀîËÄ ÄÐ 25
4 ³Â´ó ÄÐ 19

ÏÖÔÚÎÒ°Ñ autoid=3 ºÍ autoid=4 µÄÁ½Ìõ¼Ç¼ɾ³ý
È»ºóÎÒÔÙ²åÈëÒ»ÌõÊý¾Ý,ÀýÈç:

insert into userinfo(autoid,username,sex,age) values('null','´º¸ç','ÄÐ','27');

µ«ÊÇÃæÁÙÒ»¸öÎÊÌâ,±àºÅÊÇ´Ó5¿ªÊ¼ÁË,¶ø²»ÊǽÓ×Å´Ó3¿ªÊ¼.±Ï¾¹ÎÒ µÚÈýÌõºÍµÚËÄÌõ¼Ç¼ÒѾ­É¾³ýµÄÁË.

ÇëÎÊÈçºÎÈÃautoid ´Ó3¿ªÊ¼,Çë¸ßÊִͽÌ.


×Ô¶¯Ôö³¤ÁÐÉèÖóɲ»×Ô¶¯µÄ
»òÕßinsert into tb values £¨3£©£»

SQL code:
mysql> select auto_increment from information_schema.tables where table_name="te
st";
+----------------+
| auto_increment |
+----------------+
| 4 |
+----------------+
1 row in set (0.02 sec)

»òÕßÉèÖÃÕâ¸öÖµ



ÎÒÖ»ÄÜ˵,Â¥ÉÏÌ«¾´ÒµµÄ
ÎÒ²»¸øËû·Ö,ÎÒ¶Ô²»Æ𵳺ÍÈËÃñ.

¾¡Á¿²»ÒªÒ»»á×ÔÔö£¬Ò»»á¸øÓè±äÁ¿¡£
»áŪÂÒÊý¾Ý¿âµÄ¡£
Äþ¿É¶Ô´íÎóµÄÊý¾Ý½øÐÐupdateÐÞÕý£¬»òÕßdelete£¬¶ø²»ÒªinsertÒ»¸ö¸úÀÏÊý¾ÝÓÐÏàͬIDµÄÐÂÊý¾Ý¡£


Ïà¹ØÎÊ´ð£º

c,c++Á¬½Ómysql ÕÒ²»µ½Í·²¿Îļþ£¨ÐÂÊÖ£©

±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......

Mysql Êý¾Ý¿âɾ³ý²»ÁËÔõô°ì

ÎÒ֮ǰµ¼ÈëµÄÊý¾Ý¿â£¬ÏÖÔÚɾ³ý²»ÁË£¬ÓÃÁËÃüÁîÐк͹¤¾ß¶¼²»ÐУ¬ÖØÆôÒ²²»ÐУ¬ÕâÊÇΪʲôÄØ£¿
ÄãÊÇÈçºÎɾ³ýµÄ£¿
ÓÐʲôÌáʾ£¿


ÎÊÌâ˵Ã÷Ô½Ïêϸ£¬»Ø´ðÒ²»áԽ׼ȷ£¡²Î¼ûÈçºÎÌáÎÊ¡££¨ÌáÎʵÄÖǻۣ©

......

ÎÒÒª°Ñ×¢²áÐÅÏ¢Ìá½»µ½mysqlÖУ¬ÒªÔõô°ìÄØ£¿

ÎÒÔÚ×¢²áÒ³ÃæдÈëÁËÈçÏ´úÂ룺
<?php
    $conn=mysql_connect("localhost","root","614510")or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Ó´íÎó".mysql_error());
& ......

MySqlÎÊÌâ

MySqlÖвåÈ뵱ǰʱ¼äµÄ¸ÃÔõôд°¡£¿
now()

SQL code:

sqlÀïÊÇ£º
getdate()

ÒýÓÃ
now()


ѧϰ

SQL code:
select now();

SQL code:
TODAY()
?

SQL code:
select now();
/* ......

mysql°²×°ÎÊÌâ unpacking of archive failed on¡£¡£

linuxϵͳ Ô­À´×Ô´ømysqlÒѾ­Ð¶ÔØ ÐÂװа汾 °²×°Ê±Ìáʾ unpacking of  archive  failed on file usr/bin/ replace 4acebledle4d:cpio :read ÇëÎÊÊÇʲôÎÊÌâ

ÒýÓÃ
ÎļþÊÇÖ»¶ÁµÄ ¸ü¸ÄϸÃĿ¼ȨÏÞΪ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ