PHP code example of glauberkyves / mysql-functions-doctrine2

1. Go to this page and download the library: Download glauberkyves/mysql-functions-doctrine2 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

glauberkyves / mysql-functions-doctrine2 example snippets


$config = new \Doctrine\ORM\Configuration();
$config->addCustomStringFunction('concat_ws', 'GlauberKyves\MysqlDoctrineFunctions\DQL\MysqlRand');

$em = EntityManager::create($dbParams, $config);

$query = 'SELECT CONCAT_WS('string', 'string') FROM ...';
$em->createQuery($query);

$query = 'SELECT GEO(-15.5656, -47.5656, t.latitude, t.longitude) FROM tb_address t ...';
$em->createQuery($query);
sh
php composer.phar update