自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

php mysql創(chuàng)建臨時(shí)表

數(shù)據(jù)庫(kù) MySQL
創(chuàng)建臨時(shí)表使我們使用mysql數(shù)據(jù)庫(kù)時(shí)經(jīng)常會(huì)遇到的操作,下文對(duì)php開(kāi)發(fā)中mysql創(chuàng)建臨時(shí)表的方法作了詳盡的闡述,供您參考。

mysql創(chuàng)建臨時(shí)表的方法并不復(fù)雜,下面就為您詳細(xì)介紹php mysql創(chuàng)建臨時(shí)表的實(shí)現(xiàn)方法,希望對(duì)您學(xué)習(xí)mysql創(chuàng)建臨時(shí)表方面能有所幫助。

  1. <?php 
  2.         $link=mysql_connect('localhost','root','456789');  
  3.      if($link){  
  4.  
  5.     mysql_select_db('cppc360',$link);  
  6.     mysql_query("set names 'gbk'");  
  7.     echo "數(shù)據(jù)庫(kù)連接已經(jīng)成功!";  
  8.     }  
  9.  
  10. $temp_sql = "create temporary table tmp_query (tmp_id int(11) NOT NULL auto_increment PRIMARY KEY,id int(11) default NULL,area varchar(20) default NULL)";  
  11.  
  12. $temp_query = mysql_query($temp_sql);  
  13. $sql="insert into tmp_query(id,area) select id,area from php168_item_content_1 where content like '%電廠%' order by id desc";  
  14.    mysql_query($sql);  
  15.  
  16.     $sql="select * from tmp_query";  
  17.     $query1=mysql_query($sql);  
  18.     echo mysql_num_rows($query1);  
  19.     while($rs=mysql_fetch_array($query1)){  
  20.         echo $rs[id]."&nbsp;&nbsp;".$rs[area]."<br>";  
  21.     }  
  22. ?> 
  23.    
  24.  

 

 

 

【編輯推薦】

深入研究MySQL刪除多表數(shù)據(jù)

MySQL大表備份的簡(jiǎn)單方法

MySQL中文建表問(wèn)題解析

MySQL授權(quán)表使用示例

MySQL多表刪除的實(shí)現(xiàn)

責(zé)任編輯:段燃 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-04-13 13:56:52

Oracle臨時(shí)表

2010-11-22 15:19:28

Mysql臨時(shí)表

2024-10-17 16:17:21

MySQL臨時(shí)表數(shù)據(jù)庫(kù)

2010-07-01 14:46:10

SQL Server臨

2010-04-28 11:56:09

Oracle臨時(shí)表

2009-03-18 10:56:29

生命周期全局臨時(shí)表SQL Server

2010-05-17 16:31:48

Mysql臨時(shí)表

2010-10-13 16:25:44

MySQL臨時(shí)表

2010-03-29 17:03:48

Oracle創(chuàng)建

2023-05-26 16:40:22

臨時(shí)表Hive數(shù)據(jù)表存儲(chǔ)

2010-10-15 11:27:21

Mysql臨時(shí)表

2010-05-19 09:01:14

MySQL臨時(shí)表

2010-05-31 15:49:29

MySQL臨時(shí)表

2010-11-03 09:34:39

DB2臨時(shí)表

2010-06-12 10:10:55

2010-05-18 18:39:27

Mysql臨時(shí)表

2011-09-02 14:45:43

Oracle臨時(shí)表SQL Server臨

2010-09-16 15:03:10

SQL Server臨

2010-09-16 17:56:31

SQL server臨

2010-11-23 11:36:15

MySQL創(chuàng)建關(guān)聯(lián)表
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)