Piwik\Updater\Migration\Db\Factory::sql PHP Method

sql() public method

Example: $factory->sql("DELETE * FROM table_name WHERE plugin_name = 'MyPluginName'");
public sql ( string $sql, integer | int[] $errorCodesToIgnore = [] ) : Sql
$sql string The SQL query that should be executed. Make sure to prefix a table name via {@link Piwik\Commin::prefixTable()}.
$errorCodesToIgnore integer | int[] Any given MySQL server error code will be ignored. For a list of all possible error codes have a look at {@link \Piwik\Updater\Migration\Db}. If no error should be ignored use an empty array or `false`.
return Sql
    public function sql($sql, $errorCodesToIgnore = array())
    {
        if ($errorCodesToIgnore === false) {
            $errorCodesToIgnore = array();
        }
        return $this->container->make('Piwik\\Updater\\Migration\\Db\\Sql', array('sql' => $sql, 'errorCodesToIgnore' => $errorCodesToIgnore));
    }