@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param string $password This should be the password for the chosen database |
47 | 47 | * @param string $database This should be the database that you wish to connect to |
48 | 48 | * @param string|false $backuphost If you have a replication server set up put the hostname or IP address incase the primary server goes down |
49 | - * @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 |
|
49 | + * @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 |
|
50 | 50 | * @param boolean $persistent If you want a persistent database connection set to true |
51 | 51 | * @param string $type The type of connection that you wish to make can be 'mysql', 'cubrid', 'dblib', 'mssql', 'odbc', 'pgsql, or 'sqlite' |
52 | 52 | * @param int $port This should be the port number of the MySQL database connection |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * Returns a single record for a select query for the chosen table |
133 | 133 | * @param string $table This should be the table you wish to select the values from |
134 | 134 | * @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). |
135 | - * @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). |
|
135 | + * @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). |
|
136 | 136 | * @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') |
137 | 137 | * @param boolean $cache If the query should be cached or loaded from cache set to true else set to false |
138 | 138 | * @return array Returns a single table record as the standard array when running SQL queries |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | * @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). |
148 | 148 | * @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). |
149 | 149 | * @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') |
150 | - * @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) |
|
150 | + * @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) |
|
151 | 151 | * @param boolean $cache If the query should be cached or loaded from cache set to true else set to false |
152 | - * @return array Returns a multidimensional array with the chosen fields from the table |
|
152 | + * @return boolean Returns a multidimensional array with the chosen fields from the table |
|
153 | 153 | */ |
154 | 154 | public function selectAll($table, $where = array(), $fields = '*', $order = array(), $limit = 0, $cache = true){ |
155 | 155 | $this->buildSelectQuery(SafeString::makeSafe($table), $where, $fields, $order, $limit); |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | * @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). |
385 | 385 | * @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). |
386 | 386 | * @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 |
387 | - * @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) |
|
387 | + * @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) |
|
388 | 388 | */ |
389 | 389 | protected function buildSelectQuery($table, $where = array(), $fields = '*', $order = array(), $limit = 0){ |
390 | 390 | if(is_array($fields)){ |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | |
493 | 493 | /** |
494 | 494 | * Returns the limit SQL for the current query as a string |
495 | - * @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 |
|
495 | + * @param integer $limit This should either be set as an integer or should be set as an array with a start and end value |
|
496 | 496 | * @return string|false Will return the LIMIT string for the current query if it is valid else returns false |
497 | 497 | */ |
498 | 498 | private function limit($limit = 0){ |