PhpMyAdmin: wildcards as default in search tab

The new PhpMyAdmin, the 5.2.3, unlike the previous, the 5.2.2, has “like” instead of “like %…%” as default search command.

If you prefer the previous default you can do it following these instructions .

I managed to bo back to the previous default modifying only the file
phpMyAdmin/libraries/classes/Types.php
at rows 99 -100

from

return [
'LIKE',
'LIKE %...%',

to
return [
'LIKE %...%',
'LIKE',


import an xml into phpmyadmin

Given that WordPress doesn’t allow to import a local file (and this is quite unfair, in my opinion), you can transform a wp site into a xml file and then import it in your local database via phpmyadmin.

But you have to format carefully the xml: look how phpmyadmin export an xml file and format your xml according to that model.

calculate age from year of birth

There are two ways:

via php

## 2. in php
You can also use php code, as in the following way
(inspired from this page (https://stackoverflow.com/questions/3776682/php-calculate-age), and _slighty modified_: 

    $dob =”$row[anno_nascita]”;
    $age = date_diff(date_create($dob), date_create(‘now’))->y;
    echo “age: $age years
“;

via mysql in phpmyadmin

1.do this sql query:
     select *,year(CURDATE())-year(anno_nascita) age from studenti__classi; 
2. save the result as view
3. and so you will have, in the view, the age (of your students, i.g.) that can work in LibreBase (to connect with that view).