PHP code example of koolreport / cleandata

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

    

koolreport / cleandata example snippets


$this->src('db')
->query("select * from customers")
->pipe(new DropNull())
->pipe($this->dataStore('clean_data'));

->pipe(new DropNull(array(
    "targetValue"=>0,
)))

->pipe(new FillNull(array(
    "newValue"=>0
)))

->pipe(new FillNull(array(
    "targetValue"=>0,
    "newValue"=>10,
)))