#281494 by beeradb. Code style.
parent
eab2f22e36
commit
0eea3a5196
|
@ -202,18 +202,18 @@ function db_num_rows($result) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an individual result field from the previous query.
|
* Return an individual result field from the previous query.
|
||||||
*
|
*
|
||||||
* Only use this function if exactly one field is being selected; otherwise,
|
* Only use this function if exactly one field is being selected; otherwise,
|
||||||
* use db_fetch_object() or db_fetch_array().
|
* use db_fetch_object() or db_fetch_array().
|
||||||
*
|
*
|
||||||
* @param $result
|
* @param $result
|
||||||
* A database query result resource, as returned from db_query().
|
* A database query result resource, as returned from db_query().
|
||||||
* @param $row
|
* @param $row
|
||||||
* The index of the row whose result is needed.
|
* The index of the row whose result is needed.
|
||||||
* @return
|
* @return
|
||||||
* The resulting field or FALSE.
|
* The resulting field or FALSE.
|
||||||
*/
|
*/
|
||||||
function db_result($result, $row = 0) {
|
function db_result($result, $row = 0) {
|
||||||
if ($result && mysqli_num_rows($result) > $row) {
|
if ($result && mysqli_num_rows($result) > $row) {
|
||||||
$array = mysqli_fetch_array($result, MYSQLI_NUM);
|
$array = mysqli_fetch_array($result, MYSQLI_NUM);
|
||||||
|
|
Loading…
Reference in New Issue