PHP code example of agoussec / phpdbtabletoexcel

1. Go to this page and download the library: Download agoussec/phpdbtabletoexcel 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/ */

    

agoussec / phpdbtabletoexcel example snippets


$sql = "SELECT 
           table2.column1 as `Column 1`, 
           table3.column2 as `Column 2`, 
           table1.column3 as `Column 3`, 
        FROM `table1`
           left JOIN table2 ON table2.id = table1.table2id
           left JOIN table3 ON table3.id = table1.table3id 
        WHERE table1.status = 1";

 $export->setQuery($sql);