phprs\ezsql\Sql::replaceInto PHP Method

replaceInto() public static method

replaceInto('table') => "REPLACE INTO table"
public static replaceInto ( string $table ) : ValuesRule
$table string
return phprs\ezsql\rules\replace\ValuesRule
    public static function replaceInto($table)
    {
        $obj = new ReplaceIntoRule(new SqlConetxt());
        return $obj->replaceInto($table);
    }

Usage Example

Ejemplo n.º 1
0
 public function testForReplace1()
 {
     //REPLACE INTO tab VALUES(1,2,now())
     $this->db->setExpected('REPLACE INTO tab VALUES(?,?,now())', 1, 2);
     Sql::replaceInto('tab')->values([1, 2, Sql::native('now()')])->exec($this->db);
 }