Unknown field: (index 0)
Unknown field: (index 0)
omurlts
Posts: 35Questions: 6Answers: 0
var editor;
$(document).ready(function() {
var table = $('#datalistesi').DataTable({
pageLength : 10,
lengthChange : false,
select : true,
deferRender : true,
language : {"url": "assets/plugins/datatables/tr.lang"},
ajax: {
url: "staff.php",
type: "POST"
},
searchCols : [],
serverSide: true,
columnDefs : [
{
targets : 0,
render : function (data) {
return data.mod_datalistesi.id;
}
},
{
}
],
columns: [
{ data: null },
{ data: "mod_datalistesi.id" },
{ data: "mod_datalistesi.firma" }
],
///stateSave: true,
order : [[1, 'desc']]
});
});
hello server side data return but searching give error How can I fix
This discussion has been closed.
Answers
Hi @omurlts ,
You would normally get that error when the data being returned doesn't match the columns that are defined. Could you post the Ajax response, please, or better still, point to a page that demonstrates the problem?
Cheers,
Colin
hello @colin
thanks for answering. im fix this problem but im have new problem
->leftJoin( 'mod_cagri_cagrilistesi', 'mod_cagri_cagrilistesi.arama_id', '=', 'mod_cagri_aramalistesi.id' )
im want mod_cagri_cagrilistesi last arama_id how selecting this
I don't understand what you mean I'm afraid. Could you elaborate please?
Thanks,
Allan
hello @allan
1- ) how make editor in group by
2-) Client Side working this code (two value filter)
table.columns(2).search(f_data_select .join("|"), true,false).draw();
but server side not working
what should I do
There is no option to use the current PHP, NodeJS or .NET libraries with a
GROUP BY
command. You would need to use aVIEW
.The current PHP, NodeJS and .NET libraries do not currently support regular expression search I'm afraid.
Allan
:S im so much tired...
im want ask new!
1-) im how range two date filter (server side) !! any example have ?
2-) im need multi select data (server side)
im how make this pls give me example ...
I don't have an example of that specifically. However, this example shows how you can send extra data to the server (in this case the date values) and use a condition in whatever server-side script you are using (are you using any of the provided libraries?) to perform that search. Then just call
draw()
when the date is changed for the filter.This would need to be implemented with some custom code. If you can tell me what server-side libraries you are using, I'll be able to point you to the documentation showing how to perform custom queries.
Allan
hello @allan im have editor licence.
im using editor library and mysql database...
Thanks - assuming you are using the PHP libraries, the documentation for how to perform custom conditions is available here. Similar docs are available for the .NET and NodeJS libraries.
Allan
it would be better if it was a sample code block
thanks @allan