|
PHP5中文手册
mysqli_querymysqli->query()(PHP 5) mysqli->query() — Performs a query on the database 说明Procedural style:
mixed mysqli_query
( mysqli $link
, string $query
[, int $resultmode
] )
Object oriented style (method): mysqli
mixed query
( string $query
[, int $resultmode
] )
Performs a query against the database. Functionally, using this function is identical to calling mysqli_real_query() followed either by mysqli_use_result() or mysqli_store_result(). 参数
返回值如果成功则返回 TRUE,失败则返回 FALSE。 For SELECT, SHOW, DESCRIBE or EXPLAIN mysqli_query() will return a result object. 范例Example#1 Object oriented style
<?php Example#2 Procedural style
<?php 上例将输出:
|