Datatable AJAX Join Tables to Get JSON values
Datatable AJAX Join Tables to Get JSON values

Can someone explain to me why I keep getting the following error and why when I join another table from my database to my datatable I face errors. I used datatables for another page I built in my project but I only needed to get data from one table. I would really appreciate any help fixing this.
I've attached my code.
Here is the error code.
<br />
<b>Warning</b>: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\sis\pages\admin\ajax\staff_ajax.php</b> on line <b>25</b><br />
<br />
<b>Warning</b>: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\sis\pages\admin\ajax\staff_ajax.php</b> on line <b>31</b><br />
<br />
<b>Warning</b>: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\sis\pages\admin\ajax\staff_ajax.php</b> on line <b>39</b><br />
{"draw":1,"iTotalRecords":null,"iTotalDisplayRecords":null,"aaData":[]}
This question has an accepted answers - jump to answer
Answers
I figured out what my issue was. It actually had to do with the sorting part of the datatable and my index column was a varchar data type and not an int data type.
Thanks for posting back - good to hear you've got it fixed.
Allan