最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
We know that SQL SELECT statements are used to read data from the MySQL table.
To conditionally select data from a table, you can set the The following is the use of the SQL SELECT statement You can use one or more tables in the query, using commas, splits, and You can do it in the You can specify one or more conditions using AND or OR. The WHERE clause can also be applied to the SQL The WHERE clause is similar to the if condition in a program language, reading the specified data according to the field values in the MySQL table. The following is a list of operators that can be used in the WHERE clause. The example in the following table assumes that An is 10 and B is 20. Operator Description Example Equal sign, checks whether two values are equal, and returns true if they are equal (a = B) returns false. Not equal. Check whether the two values are equal. If not, return true. (a! = B) returns true. Greater than sign, checks whether the value on the left is greater than the value on the right, and returns true if the value on the left is greater than the value on the right (a > B) returns false. Less than sign, check whether the value on the left is less than the value on the right, and return true if the value on the left is less than the value on the right (a < B) returns true. Greater than or equal to sign, detects whether the value on the left is greater than or equal to the value on the right, and returns true if the value on the left is greater than or equal to the value on the right (a > = B) returns false. The less than or equal sign detects whether the value on the left is less than or equal to the value on the right, and returns true if the value on the left is less than or equal to the value on the right (a < = B) returns true. If we want to read the specified data in the MySQL data table Use the primary key as the If the given condition does not have any matching records in the table, the query does not return any data. We will use the Example The following example reads SQL SELECT WHERE clause Output result: MySQL’s The following is an example: BINARY keyword The BINARY keyword is used in the instance, which is case-sensitive, so the query condition of runoob_author=’runoob.com’ has no data. You can use the PHP function to read data using the PHP script. This function is used to execute the SQL command, and then through the PHP function The following example will be derived from the MySQL WHERE clause test: The output is as follows: WHERE Clause added to the SELECT Statement.Grammar ¶
WHERE Clause to read data from a data table:SELECT field1, field2,...fieldN FROM table_name1, table_name2... [WHERE condition1 [AND [OR]] condition2.....
WHERE Statement to set the query conditions. WHERE Any condition is specified in the. DELETE Or UPDATE Orders. = <> , != > < >= <= WHERE Clauses are very useful. WHERE The conditional query for the clause is very fast.Read data from a command prompt ¶
WHERE Clause to read the MySQL data table runoob_tbl Data in: runoob_tbl In the table runoob_author The field value is Sanjay All records of:SELECT\*fromrunoob_tblWHERErunoob_author='菜鸟教程';

WHERE The string comparison of a clause is case-insensitive. You can use the BINARY keyword to set the WHERE The string comparison of clauses is case-sensitive.mysql> SELECT * from runoob_tbl WHERE BINARY runoob_author='runoob.com'; Empty set (0.01 sec) mysql> SELECT * from runoob_tbl WHERE BINARY runoob_author='RUNOOB.COM'; +-----------+---------------+---------------+-----------------+ | runoob_id | runoob_title | runoob_author | submission_date | +-----------+---------------+---------------+-----------------+ | 3 | JAVA 教程 | RUNOOB.COM | 2016-05-06 | | 4 | 学习 Python | RUNOOB.COM | 2016-03-06 | +-----------+---------------+---------------+-----------------+ 2 rows in set (0.01 sec)
mysqli_query() And the same SQL SELECT belt. WHERE Clause to get the data. mysqli_fetch_array() To output data for all queries.Example ¶
runoob_tbl Return to use in the table runoob_author Records with field values of RUNOOB.COM:菜鸟教程 MySQL WHERE 子句测试
'; echo '
'; // 释放内存 mysqli_free_result($retval); mysqli_close($conn); ?> '; while($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) { echo "教程 ID 标题 作者 提交日期 "; } echo ' {$row['runoob_id']} ". "{$row['runoob_title']} ". "{$row['runoob_author']} ". "{$row['submission_date']} ". "