mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
Improve SQLite createFunction example (#5374)
This commit is contained in:
@@ -134,7 +134,7 @@ function sha256_and_reverse($string)
|
||||
}
|
||||
|
||||
$db = new Pdo\Sqlite('sqlite::sqlitedb');
|
||||
$db->sqliteCreateFunction('sha256rev', 'sha256_and_reverse', 1);
|
||||
$db->createFunction('sha256rev', 'sha256_and_reverse', 1);
|
||||
$rows = $db->query('SELECT sha256rev(filename) FROM files')->fetchAll();
|
||||
?>
|
||||
]]>
|
||||
|
||||
Reference in New Issue
Block a user