I'm having the same issue with edit_column the script can't find my function. Has any one found a solution for this?
@numberone, thanks for sharing this plugin. I do have some questions lingering.
If all along I have been using DataTables/Editor native method of instantiating fields in my instance of DataTables using their leftJoin() and Editor::inst(...)->process($_POST)->data(), and if should I choose to use IgnitedDataTables, do I need to discard all the code I used in the original code calls into the format provided in IgnitedDatatables? The reason I asked is that initially I have been using only Left Joins and differentiate different rows using Editor::inst($db, 'TableName', 'ID'), but now I feel the necessity to include aggregate functions like GROUP BY and SUM() because I was being requested by a client to include summed-up data in the column itself as opposed to being in the footer of the table. Do you have any insights into this?
Editor::inst($db, 'TableName', 'ID')
I have problem too with callbacks on edit_column someone could solve it or have idea...???
I am sorry i couldn't improve the library so far because of my works.. Now, I rewrote the library. Still need some more tests before actual release.
Your ajax file will be like this: (sakila db for example):
$dt = new Datatables(new MySQL, $config);
$dt->query("Select film.film_id as id, title, description, rental_rate, category_id from film left join film_category on film_category.film_id = film.film_id where film.film_id > 2 and film.film_id < 55");
thats all. it is simple and easy to use :)
have tried 2 complex queries so far and it just works :)
// SAMPLE QUERIES THAT WORKS ATM.
$dt->query("SELECT c.name AS category,sum(p.amount) AS total_sales FROM ((((payment p join rental r on p.rental_id = r.rental_id ) join inventory i on r.inventory_id = i.inventory_id ) join film f on i.film_id = f.film_id ) join film_category fc on f.film_id = fc.film_id ) join category c on fc.category_id = c.category_id group by c.name order by total_sales desc;");
$dt->query("select first_name, last_name, email, sum(payment.amount) as pa, rental_id from customer JOIN payment on customer.customer_id = payment.customer_id group by email;");
You will be able to install the library via composer.(it is awesome ^^)
You will be able to add custom columns or edit columns as before.
Stay tuned :)
I need datatable library for my custom component , i have download library form https://github.com/n1crack/IgnitedDatatables-php-library, changed database details in ajax.php from example folder and run basic_init but it shows "DataTables warning: table id=example - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1" is this anything i need to configure
I expect it would be useful if you were to post whatever the Ajax return is - likely it will contain an error message like the tech note the error message links to states.
This is old topic.
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.