Source for file param.php

Documentation is available at param.php


1 <?php
2 /**
3 * @package Examples
4 * @author Derick Rethans <derick@php.net>
5 */
6
7 /**
8 * Return rows
9 *
10 * Run a query on the database connection and return the specified number
11 * of rows if specified
12 * @private
13 * @param resource $conn The database connection resource
14 * @param string $query The query
15 * @param int $limit Limit to this number of returned rows
16 * @return array
17 */
18 function _runQuery ($conn, $query, $limit = 0)
19 {
20 $ret = array();
21 mysql_query ($conn, $query . ($limit ? " LIMIT$limit" : ""));
22 while ($row = $mysql_fetch_row) {
23 $ret[] = $row;
24 }
25 return $ret;
26 }
27 ?>

Documentation generated on Tue, 18 Nov 2003 18:06:12 +0100 by phpDocumentor 1.2.2