How to execute mysql? $sql=DB::select('..'); (for plunig)

who could help me?
how I can to execute mysql?

use DB;

$sql = DB::select('select as id, as name FROM tasks t, projects p WHERE … );

Fatal error: Uncaught Error: Class ‘DB’ not found in…

or with mysqli
thanks in advance

You need to use PicoDB as Kanboard does not use mysqli.

The following can be used in any class that extends ‘Kanboard\Core\Base’

->columns(‘SUM(time_estimated) AS time_estimated’, ‘SUM(time_spent) AS time_spent’, ‘is_active’)
->eq(‘project_id’, $project_id)

1 Like