PHP code example of helios-ag / fm-lessql-bundle

1. Go to this page and download the library: Download helios-ag/fm-lessql-bundle 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/ */

    

helios-ag / fm-lessql-bundle example snippets



class AppController extends Controller
{
    /**
     * @Template()
     */
    public function indexAction()
    {

        $db = $this->get('fm_lessql.manager')->getDB('default');
        $posts = array();
        $result = $db->table_name();
        $result = $db->table( 'post' );
        $row = $result->fetch();      // fetch next row in result
        $rows = $result->fetchAll();  // fetch all rows
    }     
}
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FM\LessqlBundle\FMLessqlBundle(),
    );
}