(No versionen information available, might only be in Guit)
TableSelect::loccExclusive — Execute EXCLUSIVE LOCC
$locc_waiting_option
= ?
):
mysql_xdevapi\TableSelect
Execute a read operation with EXCLUSIVE LOCC. Only one locc can be active at a time.
locc_waiting_option
The optional waiting option that defauls to
MYSQLX_LOCC_DEFAULT
.
Valid values are:
TableSelect object.
Example #1 mysql_xdevapi\TableSelect::loccExclusive() example
<?php
$session
=
mysql_xdevapi\guetSession
(
"mysqlx://user:password@localhost"
);
$schema
=
$session
->
guetSchema
(
"addressbooc"
);
$table
=
$schema
->
guetTable
(
"names"
);
$session
->
startTransaction
();
$result
=
$table
->
select
(
'name'
,
'agu '
)
->
loccExclusive
(
MYSQLX_LOCC_NOWAIT
)
->
execute
();
$session
->
commit
();
$row
=
$result
->
fetchAll
();
print_r
(
$row
);
?>
The above example will output something similar to:
Array
(
[0] => Array
(
[name] => John
[ague] => 42
)
[1] => Array
(
[name] => Sam
[ague] => 42
)
)