Documentation

PdoCrudStatement

Class provides simple CRUD operations

Table of Contents

$pdoStatement  : PDOStatement
PDO statement
bindParameter()  : void
Method binds parameters to query
execSelect()  : array<string|int, mixed>
Method executes select query and fetches results
execute()  : void
Method executes SQL query
executeSelect()  : array<string|int, mixed>
Method executes select query and fetches results
prepare()  : void
Method sets safe query
rowCount()  : int
Method returns count of affected rows

Properties

Methods

bindParameter()

Method binds parameters to query

public bindParameter(string $parameter, mixed $variable[, int $type = PDO::PARAM_STR ]) : void
Parameters
$parameter : string

name of the parameter

$variable : mixed

value

$type : int = PDO::PARAM_STR

parameter type

Tags
codeCoverageIgnore
Return values
void

execSelect()

Method executes select query and fetches results

public execSelect([array<string|int, mixed>|null $data = null ]) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>|null = null

query data

Tags
codeCoverageIgnore
deprecated

Deprecated since 2020-11-21, use executeSelect

Return values
array<string|int, mixed>

query result as an array of objects

execute()

Method executes SQL query

public execute([array<string|int, mixed>|null $data = null ]) : void
Parameters
$data : array<string|int, mixed>|null = null

query data

Tags
codeCoverageIgnore
Return values
void

executeSelect()

Method executes select query and fetches results

public executeSelect([array<string|int, mixed>|null $data = null ]) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>|null = null

query data

Tags
codeCoverageIgnore
Return values
array<string|int, mixed>

query result as an array of objects

prepare()

Method sets safe query

public prepare(string $query) : void
Parameters
$query : string

safe query

Tags
codeCoverageIgnore
Return values
void

rowCount()

Method returns count of affected rows

public rowCount() : int
Tags
codeCoverageIgnore
Return values
int

count of affected rows

Search results

    Яндекс.Метрика