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

mysql ±¸·ÝÁ·Ï°

<?php
$db_name="new";
mysql_connect("localhost","root","123456");
mysql_select_db($db_name);
$tb=mysql_list_tables($db_name);
$sql="";
while($query=mysql_fetch_row($tb)){
 $sql="";$table_sql="";
    $sql.= get_table_fn($query[0]);
    get_table_row($query[0]);
   // echo $table_sql."\n";
}
$f=fopen($db_name.".sql","w+");
fwrite($f,$sql);
fclose($f);
//±¸·ÝËùÓбíSQLÓïÃû
function get_table_fn($db_name){
 $field="CREATE TABLE `$db_name`( \n";
  $query=mysql_query("select * from $db_name");
 while($row=mysql_fetch_field($query)){
   if($row->not_null===1){$null="DEFAULE NULL";}else{$null="NOT NULL";}
   if($row->primary_key===1){$key="primary key";}else{$key="";}
   if($row->unsigned===1){$unsig="unsigned";}else{$unsig="";}
   $field.="`$row->name` $row->type($row->max_length) $null $key $unsig ,\n";
 }
 $field.=")\n";
 return $field;
}
//±¸·ÝËùÓбíµÄÊý¾ç
function get_table_row($db_name){
     $query=mysql_query("select * from $db_name");
     $field="";
     $num_rows= mysql_num_rows($query);
     $num_field=mysql_num_fields($query);
        $table_sqls="";
  while($row=mysql_fetch_row($query)){
     $r= get_table_fd($num_field,$row);
     $table_sqls.="insert into `$db_name` values($r)\n";
   }
  $f=fopen($db_name.".sql","w+");
  fwrite($f,$table_sqls);
  fclose($f);
}
//»ñȡÿÕűíµÄ×Ö¶ÎÖµ
function get_table_fd($num_field,$row){
 $r="";
 for($i=0;$i<$num_field;$i++){
  $r.= "'$row[$i]',";
 }
    $r=substr($r, 0, strlen($r)-1);
    return  $r;
}
?>


Ïà¹ØÎĵµ£º

Memcache VS MySQL Query Cache.

¼ÇµÃǰÌìÓÐÈËÎÊÎÒ£¬ Memcache ºÍ MySQL ×Ô¼ºµÄ Query Cache ÓÐÉ¶Çø±ð? ÎÒÕâÑù»Ø´ðµÄ£¬Ç°ÕßÊÇɽկÖеÄÕ½¶·»ú£¬ºóÕßÊǹٷ½µÄÕ½¶·»ú¡£
ÐÂÊֻشðÎÊÌ⣬´íÁËι֡£¹þ¹þ¹þ¡£
ºÃÏñϸ½ÚÉϵIJî±ð»¹ÊÇÓеġ£
MemcacheÓŵãÈçÏ£º
  1. ÀíÂÛÉÏ¿ÉÒÔÖ§³ÅÎÞÏÞ²¢·¢ÒµÎñ²Ù×÷¡£
  2. ¿ÉÒÔÆôÓõ¥¶ÀµÄʵÀýÀ´»º´æ¾Þ¶àµÄÊý¾Ý¡££¨µ± ......

Mysql »ù±¾µÄ³£ÓÃÃüÁî

ÓкܶàÅóÓÑËäÈ»°²×°ºÃÁË MySQL µ«È´²»ÖªÈçºÎʹÓÃËü¡£ÔÚÕâÆªÎÄÕÂÖÐÎÒÃǾʹÓÁ¬½Ó MySQL¡¢ÐÞ¸ÄÃÜÂë¡¢Ôö¼ÓÓû§µÈ·½ÃæÀ´Ñ§Ï°Ò»Ð© MySQL µÄ³£ÓÃÃüÁî¡£
Ò»¡¢Á¬½ÓMySQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
¡¡¡¡Ê×ÏÈÔÚ´ò¿ª DOS ´°¿Ú£¬È»ºó½øÈëĿ¼ mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u ......

mysql Á¬½Óorcal Êý¾Ý¿â OCIDefineByName


Oracle 8 資ÁÏ庫º¯Ê½庫
OCIDefineByName
讓 SELECT Ö¸Áî¿ÉʹÓà PHP 變數¡£
語·¨: boolean OCIDefineByName(int stmt, string ColumnName, mixed &variable, int [type]);
傳»ØÖµ: ²¼ÁÖÖµ
º¯Ê½種類: 資ÁÏ庫¹¦ÄÜ
 
內È ......

MySQL Cluster Overview


MySQL Cluster
is a technology that enables
clustering of in-memory databases in a shared-nothing system. The
shared-nothing architecture allows the system to work with very
inexpensive hardware, and with a minimum of specific requirements
for hardware or software.

......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ