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

ÓÃPHPÅÅÐòmysqlÎÊÌâ

²»ÖªµÀÊDz»ÊÇÎÒµÄxamppÓÐÎÊÌ⣬mysqlÊÇͼÐλ¯µÄ£¡
Ò»¸öID×éÔÚÎÒµÄmysqlµÄ±íÀïÃæ 2£¬5£¬8£¬7
µãÁËÅÅÐò£¬È»ºóÓÃPHPÎļþÁ¬½ÓÕâ¸ö±íÏÔʾ±íµÄÐÅϢʱ£¬IDµÄ˳Ðò»¹ÊDz»±ä£¡Ó¦¸ÃÊÇ2£¬5£¬7£¬8µÄ°ÉÉýÐòÅÅÐòºó£¡
ÔÚPHPÎļþÀïÓÃPHP code:
$sql="SELECT * from retabs ORDER BY num asc";
$results=mysql_query($sql)
or die("ÅÅÐòʧ°Ü".mysql_error);

Ò²²»ÐУ¡ÓôÃÆËÀÁË£¡Ò²²»ÌáʾÅÅÐòʧ°Ü£¡
ÇëÎÊÕâ¸öÊÇÔõô»ØÊ°¡£¿
лл´ó¼ÒÁË
PHP code:


ÄãÒª°´IDÅÅÐòÓ¦¸ÃÊÇ£º
select * from retabs order by id;




¶î »Ø¶þÂ¥µÄ£¡ÎÒÄÇÅÅID×éËù¶ÔÓ¦µÄÃû×ÖÊÇnum£¬ºÇºÇ£¡
ÎÒµÄÓ﷨û´íµÄ

Ë­°ï¶¥Ï°¡ ллÁË

Äã°Ñ´íÎóÐÅÏ¢´òÓ¡³öÀ´¿´¿´

SQL code:

$sql="SELECT * from `retabs` ORDER BY `num` ASC";



¿´ÄãµÄÓï¾ä£¬Ó¦¸ÃûÓдíµÄ

ÄÇÄã°ÑID×éÉèÖóÉ×ÔÔöÀàÐÍ 

SQL code:
alter table retable change num int auto_increment primary key


ÄãÓ¦¸Ã³¢ÊÔʹÓÃmysqlµÄÃüÁîÐÐÖвâÊÔÄãµÄsqlÓï¾äÓÐûÓÐÎÊÌâ¡£
Èç¹ûûÓÐÄã¾ÍÓ¦¸ÃÈ¥ÏëÏëÆäËûµØ·½µÄÎÊÌâ¡£


ÅÅÐòµ


Ïà¹ØÎÊ´ð£º

PHP Á¬½ÓOracle ³ö´í

<?php
  getenv("ORACLE_HOME");
  $conn=ocilogon("test","test","test_db");
  if($conn)  
  echo success;  
&nb ......

¸¶·ÑÇóÒ»¶Îphp´úÂ룬֧³ÖÌÔ±¦½»Ò× - PHP / »ù´¡±à³Ì

¸÷λ´óÏÀ 
ÇóÒ»¶Îphp´úÂë 
¿ÉÒÔʵÏÖÒÔϹ¦ÄÜ 
Õë¶Ô²»Í¬µÄä¯ÀÀÆ÷ÏÔʾ²»Í¬µÄͼƬ 
¾ÍÊÇÓÐÒ»ÕÅͼƬ£¬Ö»Ïë¸øie6Óû§¿´µ½ 
Èç¹ûie7¡¢chrome¡¢firefoxÓû§ä¯ÀÀÔòÏÔʾÁíÍâÒ»ÕÅͼƬ  ......

Çë½Ì PHP ÌØÊâ×Ö´¦ÀíÎÊÌâ

ÀýÈçÒ»¾äÎı¾ AAA'BBB\CCC 
ÓÃÁË mysql_real_escape_string ºó ¿ÉÒÔ´æ½øÊý¾Ý¿â
µ«¶Á³öÀ´µÄʱºò£¬¾Í³ÉÁË
AAA\'BBB\\\CCC 
ÈçºÎ»¹Ô­Îª AAA'BBB\CCC
addslashes
stripslashes

[b][/b]ÒýÓÃ
adds ......

mysqlµÄÁ¬½Ó³¬Ê±Ê±¼äÔõôÉèÖà - VC/MFC / Êý¾Ý¿â

ÎÒÊÇÓÃmysql×Ô´øµÄC API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))

AfxMessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü") ......

eclipseÓëmySQLµÄÎÊÌâ - Java / Eclipse

ÔÚ°²×°Java±àÒëÆ÷µÄEclipseµÄʱºò£¬¶Ô»·¾³±äÁ¿½øÐÐÁËÅäÖã¬ÔÚ°²×°MySQlµÄʱºòÒ²Òª¶Ô»·¾³±äÁ¿½øÐÐÅäÖã»ÄÇôºóÃæµÄÅäÖûáÓ°ÏìÇ°ÃæµÄEclipseµÄÅäÖÃÂð£¿
Çë´ó¼Ò¶àÖ¸½Ì~£¡Ð»Ð»£¡
²»»á°Ñ£¬ÎÒÕⶼװÁ赀 ÎÒϵͳÀï »¹×°ÁË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ