mysqliÓëmysqlÇø±ð
mysqlÊǷdzּÌÁ¬½Óº¯Êý¶ømysqliÊÇÓÀÔ¶Á¬½Óº¯Êý¡£Ò²¾ÍÊÇ˵
mysqlÿ´ÎÁ´½Ó¶¼»á´ò¿ªÒ»¸öÁ¬½ÓµÄ½ø³Ì¶ømysqli¶à´ÎÔËÐÐmysqli½«Ê¹ÓÃͬһÁ¬½Ó½ø³Ì,´Ó¶ø¼õÉÙÁË·þÎñÆ÷µÄ¿ªÏú
ÓÐЩÅóÓÑÔÚ±à³ÌµÄʱºò£¬Ê¹ÓÃnew mysqli('localhost', usenamer', 'password', 'databasename');×ÜÊDZ¨´í£¬Fatal error: Class 'mysqli' not found in d:\...
mysqliÀ಻ÊÇphp×Ô´øµÄÂð£¿
²»ÊÇĬÈÏ¿ªÆôµÄ£¬winÏÂÒª¸Äphp.ini,È¥µôphp_mysqli.dllÇ°µÄ;,linuxÏÂÒª°Ñmysqli±àÒë½øÈ¥
Ïà¹ØÎĵµ£º
¡¡ÍøÉÏÓкܶàµÄÎÄÕ½ÌÔõôÅäÖÃMySQL·þÎñÆ÷£¬µ«¿¼Âǵ½·þÎñÆ÷Ó²¼þÅäÖõIJ»Í¬£¬¾ßÌåÓ¦ÓõIJî±ð£¬ÄÇЩÎÄÕµÄ×ö·¨Ö»ÄÜ×÷Ϊ³õ²½ÉèÖòο¼£¬ÎÒÃÇÐèÒª¸ù¾Ý×Ô¼ºµÄÇé¿ö½øÐÐÅäÖÃÓÅ»¯£¬ºÃµÄ×ö·¨ÊÇMySQL·þÎñÆ÷Îȶ¨ÔËÐÐÁËÒ»¶Îʱ¼äºóÔËÐУ¬¸ù¾Ý·þÎñÆ÷µÄ”״̬”½øÐÐÓÅ»¯¡£
mysql> show global status;
¡¡¡¡¿ÉÒÔÁгöMySQL·þÎ ......
ÏÂÎç¿´ÁËÒ»¶ÎPHP100µÄÊÓƵ¡£
Ò²ËãÓеãÊÕ»ñ¡£
ÀïÃæµÄÒ»¶Î×ÔдµÄfindallµÄSQLº¯Êý£º
public function findall($table) {
$this->query("SELECT * from $table");
}
ÔÀ´Ö»ÊÇÕâô¼òµ¥£¬¸Õ»¹ÔÚ˼¿¼¡£
ʹÓÃÁËTAB¼üÉÏÃæµÄ¶ÙºÅÀ´ÐÞÊÎMYSQLÀïµÄ×Ö¶ÎÃû£¬È磺
UPDATE tablename SET `fieldname`='values' wh ......
MySQLÖÐʹÓô洢¹ý³Ì
ʹÓÃCallableStatementsÖ´Ðд洢¹ý³Ì
mysql°æ±¾:5.0
Connector/JµÄ°æ±¾:3.1.1ÒÔÉÏ(java.sql.CallableStatement½Ó¿ÚÒÑÍêȫʵÏÖ,³ýÁËgetParameterMetaData()·½·¨)
MySQLµÄ´æ´¢¹ý³ÌÓï·¨ÔÚMySQL²Î¿¼ÊÖ²áµÄ"´æ´¢¹ý³ÌºÍº¯Êý"Ò»ÕÂ.
http://www.mysql.com/doc/en/Stored_Procedures.html
ÏÂÃæÊÇÒ»¸ ......
±³¾°£ºÄ³¸öϵͳµÄmysqlÊý¾Ý¿âdnname²ÉÓÃĬÈϵÄlatin1×Ö·û¼¯£¬ÏµÍ³Éý¼¶ÐèÒª½«ËùÓÐÊý¾Ýת»»³Éutf-8¸ñʽ£¬Ä¿±êÊý¾Ý¿âΪnewdbname(½¨¿âʱʹÓÃutf8)
·½·¨Ò»£º
²½ÖèÒ» ÃüÁîÐÐÖ´ÐУºmysqldump --opt -hlocalhost -uroot -p*** --default-character-set=lantin1 dbname > /usr/local/dbname.sql
²½Öè¶þ ½« dbname.s ......