note 48534 deleted from function.sqlite-create-function by cmb
| From: | cmb@php.net | Date: | Mon, 02 Nov 2020 14:58:30 +0000 |
| Subject: | note 48534 deleted from function.sqlite-create-function by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215723@lists.php.net to get a copy of this message | ||
Note Submitter: info at myphp dot it
----
The function can be a method of a class:
<?php
class sqlite_function {
function md5($value)
{
return md5($value);
}
}
$dbhandle = sqlite_open('SQLiteDB');
sqlite_create_function($dbhandle, 'md5', array('sqlite_function',
'md5'), 1);
// From now on, you can use md5 function inside your SQL statements
?>
It works fine :)