@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @param string $password This should be the password for the chosen database |
48 | 48 | * @param string $database This should be the database that you wish to connect to |
49 | 49 | * @param string|false $backuphost If you have a replication server set up put the hostname or IP address incase the primary server goes down |
50 | - * @param object|false $cache If you want to cache the queries with Memcache(d)/Redis/APC/Xcache This should be the object else set to false |
|
50 | + * @param boolean $cache If you want to cache the queries with Memcache(d)/Redis/APC/Xcache This should be the object else set to false |
|
51 | 51 | * @param boolean $persistent If you want a persistent database connection set to true |
52 | 52 | * @param string $type The type of connection that you wish to make can be 'mysql', 'cubrid', 'dblib', 'mssql', 'odbc', 'pgsql, or 'sqlite' |
53 | 53 | * @param int $port This should be the port number of the MySQL database connection |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | * Returns a single record for a select query for the chosen table |
134 | 134 | * @param string $table This should be the table you wish to select the values from |
135 | 135 | * @param array $where Should be the field names and values you wish to use as the where query e.g. array('fieldname' => 'value', 'fieldname2' => 'value2', etc). |
136 | - * @param string|array $fields This should be the records you wis to select from the table. It should be either set as '*' which is the default or set as an array in the following format array('field', 'field2', 'field3', etc). |
|
136 | + * @param string $fields This should be the records you wis to select from the table. It should be either set as '*' which is the default or set as an array in the following format array('field', 'field2', 'field3', etc). |
|
137 | 137 | * @param array|string $order This is the order you wish the results to be ordered in should be formatted as follows array('fieldname' => 'ASC') or array("'fieldname', 'fieldname2'" => 'DESC') |
138 | 138 | * @param boolean $cache If the query should be cached or loaded from cache set to true else set to false |
139 | 139 | * @return array Returns a single table record as the standard array when running SQL queries |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | * @param array $where Should be the field names and values you wish to use as the where query e.g. array('fieldname' => 'value', 'fieldname2' => 'value2', etc). |
149 | 149 | * @param string|array $fields This should be the records you wis to select from the table. It should be either set as '*' which is the default or set as an array in the following format array('field', 'field2', 'field3', etc). |
150 | 150 | * @param array $order This is the order you wish the results to be ordered in should be formatted as follows array('fieldname' => 'ASC') or array("'fieldname', 'fieldname2'" => 'DESC') |
151 | - * @param integer|array $limit The number of results you want to return 0 is default and returns all results, else should be formated either as a standard integer or as an array as the start and end values e.g. array(0 => 150) |
|
151 | + * @param integer $limit The number of results you want to return 0 is default and returns all results, else should be formated either as a standard integer or as an array as the start and end values e.g. array(0 => 150) |
|
152 | 152 | * @param boolean $cache If the query should be cached or loaded from cache set to true else set to false |
153 | - * @return array Returns a multidimensional array with the chosen fields from the table |
|
153 | + * @return boolean Returns a multidimensional array with the chosen fields from the table |
|
154 | 154 | */ |
155 | 155 | public function selectAll($table, $where = array(), $fields = '*', $order = array(), $limit = 0, $cache = true) { |
156 | 156 | $this->buildSelectQuery(SafeString::makeSafe($table), $where, $fields, $order, $limit); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | * @param array $where Should be the field names and values you wish to use as the where query e.g. array('fieldname' => 'value', 'fieldname2' => 'value2', etc). |
386 | 386 | * @param string|array $fields This should be the records you wis to select from the table. It should be either set as '*' which is the default or set as an array in the following format array('field', 'field2', 'field3', etc). |
387 | 387 | * @param array $order This is the order you wish the results to be ordered in should be formatted as follows array('fieldname' => 'ASC') or array("'fieldname', 'fieldname2'" => 'DESC') so it can be done in both directions |
388 | - * @param integer|array $limit The number of results you want to return 0 is default and returns all results, else should be formated either as a standard integer or as an array as the start and end values e.g. array(0 => 150) |
|
388 | + * @param integer $limit The number of results you want to return 0 is default and returns all results, else should be formated either as a standard integer or as an array as the start and end values e.g. array(0 => 150) |
|
389 | 389 | */ |
390 | 390 | protected function buildSelectQuery($table, $where = array(), $fields = '*', $order = array(), $limit = 0) { |
391 | 391 | if(is_array($fields)) { |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | |
490 | 490 | /** |
491 | 491 | * Returns the limit SQL for the current query as a string |
492 | - * @param integer|array $limit This should either be set as an integer or should be set as an array with a start and end value |
|
492 | + * @param integer $limit This should either be set as an integer or should be set as an array with a start and end value |
|
493 | 493 | * @return string|false Will return the LIMIT string for the current query if it is valid else returns false |
494 | 494 | */ |
495 | 495 | private function limit($limit = 0) { |