偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

初步了解PHP獲取數(shù)據(jù)庫表信息函數(shù)

開發(fā) 后端
PHP獲取數(shù)據(jù)庫表信息函數(shù)包括:mysql_list_dbs();mysql_db_name();mysql_list_tables();mysql_list_tables();mysql_tablename()。

當(dāng)我們利用PHP編程時,需要操作數(shù)據(jù)庫的話,將會用到mysql函數(shù)。這個函數(shù)包含的內(nèi)容有很多,我們下面將會介紹的是有關(guān)PHP獲取數(shù)據(jù)庫表信息函數(shù)的一些內(nèi)容。#t#

PHP獲取數(shù)據(jù)庫表信息函數(shù)之mysql_list_dbs()

resource mysql_list_dbs([resource link_id])
獲取服務(wù)器上所有數(shù)據(jù)庫名稱.

舉例:

  1. mysql_connect("localhost", "name","pwd");   
  2. $dbs = mysql_list_dbs();  
  3. while (list($db) = mysql_fetch_row(dbs)) {  
  4. echo "$db <br>";  
  5. }  

 

注意,輸出結(jié)果與使用的用戶權(quán)限相關(guān).

PHP獲取數(shù)據(jù)庫表信息函數(shù)之mysql_db_name()

string mysql_db_name(resource result_set, interger index)
獲取在mysql_list_dbs()返回的result_set中位置為index的數(shù)據(jù)庫名.

PHP獲取數(shù)據(jù)庫表信息函數(shù)之mysql_list_tables()

resource mysql_list_tables(string database [,resource link_id])
獲取database中的所有表名.

PHP獲取數(shù)據(jù)庫表信息函數(shù)之mysql_tablename()

string mysql_tablename(resource result_set, interger index)
獲取mysql_list_tables()返回的result_set中位置為index的表名.

責(zé)任編輯:曹凱 來源: bokee.com
相關(guān)推薦

2011-07-19 11:12:36

PHPMySQL數(shù)據(jù)庫

2009-12-03 15:31:30

PHP獲取顯示數(shù)據(jù)庫數(shù)

2009-12-03 15:23:48

PHP建立和關(guān)閉數(shù)據(jù)庫

2010-09-03 12:20:54

數(shù)據(jù)庫

2009-12-07 17:33:44

PHP SQlite數(shù)

2011-03-25 13:55:17

PHP開源數(shù)據(jù)庫

2024-02-23 18:32:17

2022-12-22 13:18:54

深度學(xué)習(xí)框架

2019-11-05 10:18:04

RPM包RPMLinux

2018-09-17 16:30:24

數(shù)據(jù)庫MySQL小技巧

2020-08-31 10:48:11

MySQL數(shù)據(jù)庫數(shù)據(jù)庫技巧

2011-04-19 09:16:07

2020-07-04 11:06:45

NoSQL數(shù)據(jù)庫系統(tǒng)設(shè)計(jì)

2021-03-27 22:00:37

數(shù)據(jù)庫故障移動端

2009-11-26 16:49:27

PHP刪除數(shù)據(jù)庫表

2011-08-15 15:53:51

SQL Server數(shù)批量操作

2018-10-16 16:00:39

數(shù)據(jù)庫鎖舞MySQL

2010-09-25 15:37:38

SQL語句

2016-08-03 15:32:50

GitLinux開源

2009-11-11 16:34:45

Visual Stud
點(diǎn)贊
收藏

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