Site icon Hip-Hop Website Design and Development

How do I get knowledge from my database into my Customized Export Area

I’m attempting to get knowledge from my database to export to a XML or CSV File by utilizing a customized question. That is my perform with the question :

<?php
perform get_workhours($ID){
    $sql = $wpdb->put together("SELECT worked_hours FROM db_info WHERE job_id = $ID");
    $knowledge = $wpdb->question($sql);
    if(empty($knowledge)){
        return "0";
    }else{
        return $knowledge;
} ?>

And in my customized export subject i’ve this :

[get_workhours{ID}]

And when I attempt to preview this it provides me the error :

An unknown error occured.

Ideas for a greater thought for this downside are very welcome aswell.

Thanks upfront,

EDIT : I’m utilizing the WP All Export Professional Plugin. When including a subject to export I select the choice : Customized export subject.