cakephp-2.0 > DboSource :: fetchAll()
DboSource
- __construct
- __destruct
- _buildFieldParameters
- _constructVirtualFields
- _execute
- _filterResults
- _getJoins
- _matchRecords
- _mergeAssociation
- _mergeConditions
- _mergeHasMany
- _parseKey
- _prepareUpdateFields
- _quoteFields
- _quoteMatchedField
- _scrubQueryData
- _writeQueryCache
- alterSchema
- begin
- boolean
- buildColumn
- buildIndex
- buildJoinStatement
- buildStatement
- buildTableParameters
- cacheMethod
- calculate
- close
- commit
- conditionKeysToString
- conditions
- create
- createSchema
- defaultConditions
- delete
- disconnect
- dropSchema
- execute
- expression
- fetchAll
- fetchAssociated
- fetchResult
- fetchRow
- fetchVirtualField
- field
- fields
- flushMethodCache
- fullTableName
- generateAssociationQuery
- getConnection
- getConstraint
- getLog
- getQueryCache
- group
- hasAny
- hasResult
- identifier
- index
- insertMulti
- introspectType
- isConnected
- lastAffected
- lastError
- lastInsertId
- lastNumRows
- length
- limit
- logQuery
- name
- order
- query
- queryAssociation
- rawQuery
- read
- readTableParameters
- reconnect
- renderJoinStatement
- renderStatement
- resolveKey
- rollback
- showLog
- truncate
- update
- value
A
AbstractTransport
AclBehavior
AclComponent
AclInterface
AclNode
AclShell
Aco
AcoAction
ActionsAuthorize
ApcEngine
ApiShell
App
AppController
AppController
AppHelper
AppHelper
AppModel
AppModel
AppShell
Aro
AuthComponent
B
BadRequestException
BakeShell
BakeTask
BaseAuthenticate
BaseAuthorize
BasicAuthenticate
BasicAuthentication
BehaviorCollection
C
Cache
CacheEngine
CacheException
CacheHelper
CacheSession
CakeEmail
CakeErrorController
CakeException
CakeLog
CakeLogException
CakeLogInterface
CakePlugin
CakeRequest
CakeResponse
CakeRoute
CakeSchema
CakeSession
CakeSessionException
CakeSessionHandlerInterface
CakeSocket
ClassRegistry
CommandListShell
Component
ComponentCollection
ConfigReaderInterface
Configure
ConfigureException
ConnectionManager
ConsoleErrorHandler
ConsoleException
ConsoleInput
ConsoleInputArgument
ConsoleInputOption
ConsoleInputSubcommand
ConsoleOptionParser
ConsoleOutput
ConsoleShell
ContainableBehavior
Controller
ControllerAuthorize
ControllerTask
CookieComponent
CrudAuthorize
D
DatabaseSession
DataSource
DbAcl
DbAclSchema
DbConfigTask
DboSource
Debugger
DebugTransport
DigestAuthenticate
DigestAuthentication
Dispatcher
E
EmailComponent
ErrorHandler
ExceptionRenderer
ExtractTask
F
File
FileEngine
FileLog
FixtureTask
Folder
ForbiddenException
FormAuthenticate
FormHelper
H
Helper
HelperCollection
HelpFormatter
HtmlHelper
HttpException
HttpResponse
HttpSocket
I
I18n
I18nModel
i18nSchema
I18nShell
Inflector
IniReader
InternalErrorException
J
JqueryEngineHelper
JsBaseEngineHelper
JsHelper
L
L10n
M
MailTransport
MediaView
MemcacheEngine
MethodNotAllowedException
MissingActionException
MissingBehaviorException
MissingComponentException
MissingConnectionException
MissingControllerException
MissingDatabaseException
MissingDatasourceConfigException
MissingDatasourceException
MissingHelperException
MissingLayoutException
MissingModelException
MissingPluginException
MissingShellException
MissingShellMethodException
MissingTableException
MissingTaskException
MissingTestLoaderException
MissingViewException
Model
ModelBehavior
ModelTask
MootoolsEngineHelper
Multibyte
Mysql
N
NotFoundException
NumberHelper
O
Object
ObjectCollection
P
PagesController
PagesController
PaginatorComponent
PaginatorHelper
Permission
PhpReader
PluginShortRoute
PluginTask
Postgres
PrivateActionException
ProjectTask
PrototypeEngineHelper
R
RedirectRoute
RequestHandlerComponent
Router
RouterException
RssHelper
S
Sanitize
Scaffold
ScaffoldView
SchemaShell
Security
SecurityComponent
SessionComponent
SessionHelper
SessionsSchema
Set
Shell
ShellDispatcher
SmtpTransport
SocketException
Sqlite
Sqlserver
String
T
TaskCollection
TemplateTask
TestsuiteShell
TestTask
TextHelper
ThemeView
TimeHelper
TranslateBehavior
TreeBehavior
U
UnauthorizedException
UpgradeShell
V
Validation
View
ViewTask
W
WincacheEngine
X
XcacheEngine
Xml
XmlException
fetchAll
Returns an array of all result rows for a given SQL query.
Returns false if no rows matched.
Method
(array)
public fetchAll
($sql, $params = array(), $options = array())
Parameters
Parameter | Type | Comment | Default |
---|---|---|---|
$sql | string | required SQL statement | |
$params | array | optional parameters to be bound as values for the SQL statement | array() |
$options | array | optional additional options for the query. | array() |
Return
arrayComment
Returns an array of all result rows for a given SQL query.
Returns false if no rows matched.
### Options
- `cache` - Returns the cached version of the query, if exists and stores the result in cache.
This is a non-persistent cache, and only lasts for a single request. This option
defaults to true. If you are directly calling this method, you can disable caching
by setting $options to `false`
@param string $sql SQL statement
@param array $params parameters to be bound as values for the SQL statement
@param array $options additional options for the query.
@return array Array of resultset rows, or false if no rows matched
Returns false if no rows matched.
### Options
- `cache` - Returns the cached version of the query, if exists and stores the result in cache.
This is a non-persistent cache, and only lasts for a single request. This option
defaults to true. If you are directly calling this method, you can disable caching
by setting $options to `false`
@param string $sql SQL statement
@param array $params parameters to be bound as values for the SQL statement
@param array $options additional options for the query.
@return array Array of resultset rows, or false if no rows matched