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

php mysql»Ø¹öʾÀý

Ê×ÏÈ£¬½¨InnoDBÀàÐÍµÄ±í£¬²ÅÄÜÖ§³ÖÊÂÎñ
$handler = mysql_connect('localhost', '', '');
mysql_select_db('test');
mysql_query('SET AUTOCOMMIT=0'); // ÉèÖÃΪ²»×Ô¶¯Ìá½»²éѯ
mysql_query('START TRANSACTION'); // ¿ªÊ¼²éѯ£¬ÕâÀïÒ²¿ÉÒÔʹÓÃBEGIN
mysql_query("INSERT INTO users VALUES ('ccc')");
mysql_query("DELETE from users WHERE username = 'aac'");
if (mysql_affected_rows($handler) == 0)
mysql_query('ROLLBACK'); // Èç¹ûɾ³ýδÕÒµ½ÏàÓ¦µÄ¼Ç¼Ôò»Ø¹ö£¬²»Ö´ÐÐÉÏÃæµÄ²åÈë²éѯ
mysql_query('COMMIT');
mysql_close($handler);


Ïà¹ØÎĵµ£º

PHPÖÐsubstr()º¯ÊýµÄʵÀýÏê½â

Ô­ÐÍ£ºstring substr ( string $string , int $start [, int $length ] )£¬Ëü¿ÉÒÔÓÃÓÚÔÚÒ»¸ö½Ï³¤µÄ×Ö·û´®ÖвéÕÒÆ¥ÅäµÄ×Ö·û´®»ò×Ö·û¡£$stringΪËùÒª´¦ÀíµÄ×Ö·û´®£¬$startΪ¿ªÊ¼Ñ¡È¡µÄλÖã¬$lengthΪҪѡȡµÄ³¤¶È(µ±ËüÊǸºÊýʱΪ¸ºÊýʱ±íʾÓÒÆðÊýÆðµÄλÖÃ)¡£
Àý£º
<?php
$rest1 = substr("abcdef", 0, 0); // returns ......

OracleÒÆÖ²µ½MySQL×¢ÒâÊÂÏî

¡¡¡¡¿Í»§ÓõÄÊý¾Ý¿âÊÇmysql£¬¶øÑз¢ºÃµÄ²úÆ·Ö§³Öoracle£¬ÎªÁËÈÿͻ§ÌÍÑü°ü£¬ÎÒÃDZØÐë°ÑÊý¾Ý¿â»·¾³´ÓoracleתÏòmysql¡£ÎÒÃÇÔÚת»»µÄ¹ý³ÌÖÐÅöµ½ÁËÏÂÃæһЩÎÊÌ⣬ϣÍûÄܸøͬÑùÔâÓöµÄͬÈÊÃÇһЩ½è¼ø¡£Èç¹ûÎÒÃÇÔÚ×î³õµÄÉè¼Æ¡¢±àÂë¹ý³ÌÖÐ×¢ÒâÊý¾Ý¿âµÄÒÆÖ²ÐÔ£¬ÕâÖÖÇé¿öÏ¿ÉÒÔÍêÈ«²»ÐèÒª×÷¶îÍ⹤×÷¡£
¡¡¡¡Ò»¡¢Êý¾Ý¿â»·¾³´Óoracleת ......

MySQL 5.5 m2 VS MS Sql Server 2000 SE BenchMark

×÷Õߣº°½Ê¿Î°
·þÎñÆ÷£ºIBM X346
CPU:Intel Xeon 3.0 *4
Äڴ棺2GB
Ó²ÅÌ£ºRAID5
OS£ºwin2003 SE
Ò»¡¢MySQL 5.5 M2
MySQL ĬÈÏÒýÇæInnoDB£¬ÓÅ»¯Ç°ºó¼¸ºõÎÞ²î±ð
¶þ¡¢SQL SERVER 2000 SE
     ´ÓÕâû´Î²âÊÔ¿´£¬MysqlÔÚÊÂÎñÐÔÄܱíÏÖ²»ÈçSQL SERVER¡£Í¬Ê±£¬Á½ÕßÔÚĬÈÏÇé¿ö£¬ÅúÁ¿Insert£¬Mysql±íÏ ......

jquery php ajax json

just get a json
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<mce:script src="jquery-1.3.2.min.js" mce_src="jq ......

PHP³õѧÕßѧϰʵÀý

.$dbhost = 'localhost';  
$dbuser = 'root'; //ÄãµÄmysqlÓû§Ãû  
$dbpass = '123456'; //ÄãµÄmysqlÃÜÂë  
$dbname = 'data'; //ÄãµÄmysql¿âÃû  
//Á¬½Ó±¾µØÊý¾Ý¿â
$GLOBALS["conn"] = mysql_connect($dbhost,$dbuser,$dbpass);  
//´ò¿ªÊý¾Ý¿â
mysql_select ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ