Æ��¤ï¿½}ÆÅ¡ñÍPHP+MySQLÅgUNVÅ·B gUNVÆÍàZÌVXeÉKvsÂÈÅ·B gUNVÁĽHÁÄûÍ�}�}ð²ÉÈÁÄ »Ìdv«ðmÁÄ��½¾«½ï¿½ï¿½ ÅÍ\[XÅ·B�}Ì\[XÅÍinsertðÀsµA����µ½êÍR~bgA ¸sµ½êÍ[obN Æ��¤ðµÄ��ܷB ¿ÈÝÉmysql_queryÖÍinsert��ÈÇÌÊðÔ³È����ÉηéßèlÍ true©falseÉÈèÜ·B ÅãÉgUNVðÍ��ßéõÆ��¤Æ�}ëÍautocommitª1ÌêÍ gUNVÅàÖWÈNGªï¿½ï¿½ï¿½ï¿½·éÆ»ÌêÅ R~bgµÄµÜ¤ÌÅ0ɵÄgUNVðnßÜµå¤ ÓµÜµå¤ Iíè<? if ( !extension_loaded( "mysql" ) ) { dl( "php_mysql.dll" ); } //Ú�}p��ñ $Server = "T[o¼"; $DbName = "f[^x[X¼"; $User = "[U¼"; $Password = "pX[h"; //Ú�} $Connect = @mysql_connect( $Server, $User, $Password ); if( !$Connect ){ print "Ú�}ūܹñŵ½"; exit(); } //DBÌIð mysql_select_db( $DbName, $Connect ); //gUNVðÍ��ßéõ $Query = "set autocommit = 0"; mysql_query( $Query, $Connect ); //gUNVJn $Query = "begin"; mysql_query( $Query, $Connect ); //insertÀs $Query = "insert into Ðõ}X^ values( '0001', 'redwarcueid')"; $result = mysql_query( $Query, $Conncet ); if( $result === true ){ //R~bg $Query = "commit"; mysql_query( $Query, $Connect ); print "R~bgµÜµ½"; }else{ //[obN $Query = "rollback"; mysql_query( $Query, $Connect ); print "[obNµÜµ½"; } //MySQLØf mysql_close( $Connect ); ?>
2010N0203ú
PHP+MySQLÅgUNV
�}ÌLÖÌRg
Rgð