DataTables with Server Side and multiple tables.

DataTables with Server Side and multiple tables.

someoneheresomeonehere Posts: 4Questions: 0Answers: 0
edited February 2014 in General
I'm trying to use the server side example here. https://datatables.net/release-datatables/examples/server_side/server_side.html
I can seem to figure out how to use joins with that script.
Here's my query:
SELECT products.*, category.*, suppliers.supplier_name, tax.value
FROM products
JOIN category ON category.id=products.category_id
JOIN suppliers ON suppliers.supplier_id=products.supplier_id
JOIN tax ON tax.id=category.tax_id

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    This script might help: http://datatables.net/dev/server_processing.txt - but really it is intended only as a starting point, to be completed in whatever form that is required for your specific situation.

    Allan
  • someoneheresomeonehere Posts: 4Questions: 0Answers: 0
    Ok so its working I just can't get the data onto the table using mRender. How do I select it using mRender and row. row.products.item_image makes the table stuck on "Processing...", and row.item_image returns undefined.

    { "mData": "item_image",
    mRender: function ( data, type, row ) {
    return '';
    }
    }
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Not sure why that is I'm afraid. I would need a link to the page.

    Allan
  • someoneheresomeonehere Posts: 4Questions: 0Answers: 0
    PM'd link
This discussion has been closed.