最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
You may want to know the following three messages about MySQL:
查询结果信息: The number of records affected by the SELECT, UPDATE, or DELETE statement.
数据库和数据表的信息: It contains the structure information of database and data table.
MySQL服务器信息: Contains the current status of the database server, version number, and so on.
From the MySQL command prompt, we can easily get the above server information. But if you use a scripting language such as Perl or PHP, you need to call a specific interface function to get it. We will introduce it in more detail next. In the DBI script, the number of records affected by the statement is returned through the function do () or execute (): In PHP, you can use the You can easily get lists of databases and tables in the MySQL server. If you do not have sufficient permissions, the result will return null. You can also use SHOW TABLES or SHOW DATABASES statements to get lists of databases and tables. The following example outputs all databases on the MySQL server: View all databases The following command statements can be used at the command prompt in MySQL or in scripts, such as PHP scripts. Command Description SELECT VERSION () Server version information SELECT DATABASE () Current database name (or return empty) SELECT USER () Current user name SHOW STATUS Server statu SHOW VARIABLES Server configuration variableGet the number of records affected by the query statement ¶
PERL instance ¶
# 方法 1 # 使用do( ) 执行 $query my $count = $dbh->do ($query); # 如果发生错误会输出 0 printf "%d 条数据被影响\n", (defined ($count) ? $count : 0); # 方法 2 # 使用prepare( ) 及 execute( ) 执行 $query my $sth = $dbh->prepare ($query); my $count = $sth->execute ( ); printf "%d 条数据被影响\n", (defined ($count) ? $count : 0);
PHP instance ¶
mysqli_affected_rows( ) Function to get the number of records affected by the query statement.$result_id = mysqli_query ($conn_id, $query); # 如果查询失败返回 $count = ($result_id ? mysqli_affected_rows ($conn_id) : 0); print ("$count 条数据被影响\n"); List of databases and datasheets ¶
PERL instance ¶
# 获取当前数据库中所有可用的表。 my @tables = $dbh->tables ( ); foreach $table (@tables ){ print "表名 $table\n"; } PHP instance ¶
Database."
";}mysqli_close($conn);?> Get server metadata ¶