Search (Filter) not working.

Search (Filter) not working.

temoyusifovtemoyusifov Posts: 1Questions: 1Answers: 0
edited April 2015 in Free community support

Result of query:

{"error":"Unknown field: (index 0)","data":[]}

this is my code:
$(document).ready(function() {

        var inputFilter = $('#example').dataTable( {
            order: [[ 8, "desc" ]],
            processing: true,
            serverSide: true,

            ajax: {
                url: "/complex/examples/php/join.php",
                type: 'GET'
            },
            columns: [
                { data: null, defaultContent: '', orderable: true },
                { data: "shows_video.id" },
                {
                    data: null, render: function( data, type, full, meta ){
                        var youtube         =  data.shows_video.youtube      ? '<i class="fa fa-youtube" style="color:#24CA00;"></i>'  : '<i class="fa fa-youtube"></i>';
                        var top             =  data.shows_video.top          ? '<i class="fa fa-home" style="color:#24CA00;"></i>'     : '<i class="fa fa-home"></i>';
                        var recommended     =  data.shows_video.recomended   ? '<i class="fa fa-bookmark" style="color:#24CA00;"></i>' : '<i class="fa fa-bookmark"></i>';
                        var video           =  data.shows_video.file         ? '<i class="fa fa-film" style="color:#FFC200;"></i>'     : '<i class="fa fa-film"></i>';
                        var image           =  data.shows_video.img          ? '<i class="fa fa-camera" style="color:#24CA00;"></i>'   : '<i class="fa fa-camera"></i>';

                        return '<span title="YouTube">'+ youtube +'</span> <span title="რეკომენდებული">'+ recommended +'</span> <span title="მთავარი სლაიდერში">'+top+'</span> <span title="YouTube">'+ video +'</span> <span title="YouTube">'+ image +'</span>';
                    }
                },
                { data: "shows.title_ge" },
                { data: "shows_video.title_ge" },
                { data: "shows_video.title_en" },
                { data: "shows_video.viewscount" },
                { data: null, defaultContent: '', orderable: true },
                { data: "shows_video.adddate" }

            ],

        }

        } );



        $('#example_filter input').addClass('datetime').css({'width': '220px'});


        $('.datetime').datepicker({
            dateFormat: "yy-mm-dd",
            onSelect: function(dateText, inst){
                var date = $(this).val();
                inputFilter.fnFilter( date );
            }
        });



    } );
This discussion has been closed.