You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be useful to have the ability to extend the Data Type Declaration.
We can now choose [String],[Bool],[Int],[Number],[Object],[JSON] etc.
For example, specify your own type with the following method
$medoo->type('set', 'comma', function($data){
//set is the process used for insert and updatereturnjoin(',', $data);
});
$medoo->type('get', 'comma', function($data){
//get is the process used in selectreturnexplode(',', $data);
});
Example of use
$arr = ['a', 'b', 'c'];
$medoo->insert('table', ['id'=>1, 'tags[comma]'=>$arr]);
//Saved as 'a,b,c' in the database.$medoo->get('table', 'tags[comma]', ['id'=>1]);
//Get ['a', 'b', 'c']
Please considering.
The text was updated successfully, but these errors were encountered:
It might be useful to have the ability to extend the Data Type Declaration.
We can now choose [String],[Bool],[Int],[Number],[Object],[JSON] etc.
For example, specify your own type with the following method
Example of use
Please considering.
The text was updated successfully, but these errors were encountered: