Closed fgc0109 closed 3 years ago
You can manually change this line: https://github.com/n1crack/datatables/blob/3860416c134ee576a5240ce053af71ea814fa56a/src/QueryBuilder.php#L72
to:
$this->dataObject = true;
by the way if you need only column names, there is a helper method here: https://github.com/n1crack/datatables/blob/3860416c134ee576a5240ce053af71ea814fa56a/src/Datatables.php#L145-L151
so you can try :
$datatables = new Datatables( $db_adapter );
$datatables->query('YOUR SQL QUERY');
echo $datatables->getColumns(); // will give you column names
I only want use this lib with php ,no js ,no ajax,no request, just php just connect database and use query at version 1.7 it is easy to use but now
https://github.com/n1crack/datatables/blob/3860416c134ee576a5240ce053af71ea814fa56a/src/Datatables.php#L215
this determine statements is false :
in that function :
https://github.com/n1crack/datatables/blob/3860416c134ee576a5240ce053af71ea814fa56a/src/QueryBuilder.php#L113
it return false , i need add request/options everywhere? i just use it with php,no request,no json no js no ajax ,pure php
then I try add options
still false
false false false false false false false false forever false forever return this one
so nerver output column name
i only need give me names
$this->columns->names()