for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* This file is part of Aura for PHP.
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
namespace Aura\SqlQuery\Mysql;
use Aura\SqlQuery\Common;
* An object for MySQL UPDATE queries.
* @package Aura.SqlQuery
class Update extends Common\Update implements Common\OrderByInterface, Common\LimitInterface
{
use Common\LimitTrait;
protected function build()
return parent::build()
. $this->builder->buildLimit($this->getLimit());
builder
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* Adds or removes LOW_PRIORITY flag.
* @param bool $enable Set or unset flag (default true).
* @return $this
public function lowPriority($enable = true)
$this->setFlag('LOW_PRIORITY', $enable);
return $this;
* Adds or removes IGNORE flag.
public function ignore($enable = true)
$this->setFlag('IGNORE', $enable);
* Adds a column order to the query.
* @param array $spec The columns and direction to order by.
public function orderBy(array $spec)
return $this->addOrderBy($spec);
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: