kmt
kmt

Reputation: 97

Fatal error: Call to undefined function q() in ajaxCRUD.class.php on line 1861

When I tested ajaxcrud on my localhost ( http://www.ajaxcrud.com/ ). I got the following error.

Fatal error: Call to undefined function q() in ajaxCRUD.class.php on line 1861

Following is where the error exist.

function getFields($table){
    $query = "SHOW COLUMNS FROM $table";
    $rs = q($query); // Line 1861

    $fields = array();
    foreach ($rs as $r){
        //r sub0 is the name of the field (hey ... it works)
        $fields[] = $r[0];
        $this->field_datatype[$r[0]] = $r[1];
    }

    if (count($fields) > 0){
        return $fields;
    }

    return false;
}

Hope someone can help me. Thank you very Much ....

Upvotes: 0

Views: 745

Answers (1)

Shoe
Shoe

Reputation: 76280

The function q() is defined inside the preheader.php file inside the ajaxCRUD folder. Just include it before ajaxCRUD.class.php.

Upvotes: 3

Related Questions