CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 4.0 Strawberry API

  • Overview
  • Version:
    • 4.0
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Cake
    • Auth
    • Cache
    • Collection
    • Command
    • Console
    • Controller
    • Core
    • Database
      • Dialect
      • Driver
      • Exception
      • Expression
      • Log
      • Retry
      • Schema
      • Statement
      • Type
    • Datasource
    • Error
    • Event
    • Filesystem
    • Form
    • Http
    • I18n
    • Log
    • Mailer
    • Network
    • ORM
    • Routing
    • Shell
    • TestSuite
    • Utility
    • Validation
    • View

Class LoggedQuery

Contains a query string, the params used to executed it, time taken to do it and the number of rows found or affected by its execution.

Namespace: Cake\Database\Log

Properties summary

  • $error public
    \Exception|null

    The exception that was thrown by the execution of this query

  • $numRows public
    int

    Number of rows affected or returned by the query execution

  • $params public
    array

    Associative array with the params bound to the query string

  • $query public
    string

    Query string that was executed

  • $took public
    float

    Number of milliseconds this query took to complete

Method Summary

  • __toString() public

    Returns the string representation of this logged query

  • interpolate() protected

    Helper function used to replace query placeholders by the real params used to execute the query

  • jsonSerialize() public

    Returns data that will be serialized as JSON

Method Detail

__toString() public

¶

__toString()

Returns the string representation of this logged query

Returns
string

interpolate() protected

¶

interpolate()

Helper function used to replace query placeholders by the real params used to execute the query

Returns
string

jsonSerialize() public

¶

jsonSerialize()

Returns data that will be serialized as JSON

Returns
array

Property Detail

$error ¶ public

The exception that was thrown by the execution of this query

Type
\Exception|null

$numRows ¶ public

Number of rows affected or returned by the query execution

Type
int

$params ¶ public

Associative array with the params bound to the query string

Type
array

$query ¶ public

Query string that was executed

Type
string

$took ¶ public

Number of milliseconds this query took to complete

Type
float