Error with footer search

Error with footer search

RohithzrRohithzr Posts: 2Questions: 1Answers: 0
edited July 2014 in Free community support

First the error [response] i am getting is:
{"error":"An SQL error occurred: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined"}

if I echo the query in ssp.class.php I get:
SELECT SQL_CALC_FOUND_ROWS `conNo`, `name`, `areaName`, `vc`, `stv`, `joinDate`, `state`, `pack`, `cId` FROM customers LEFT JOIN areas ON areas.areaId = customers.areaId LEFT JOIN boxes ON boxes.boxId = customers.boxId WHERE `conNo` LIKE :binding_0AND customers.opId = 11 AND customers.state != 3 AND customers.subId = 1 ORDER BY `conNo` ASC LIMIT 0, 10

which is certainly wrong at :binding_0

This happens only when i use the footer search, the other search and all other functions are fine.

$(document).ready(function() {
            //tfoot input create
            $('#customers tfoot th').each(function() {
                var title = $('#customers thead th').eq($(this).index()).text();
                $(this).html('<input class="span12" type="text" placeholder="Search ' + title + '" />');
            });

            //datatable initialisation
            var table = $('#customers').DataTable({
                "processing": true,
                "serverSide": true,
                "ajax": "functions/get_customers.php",
                "paginationType": "full_numbers",
                "dom": '<"pad5"CT><"clear"><lf<"clear">r<t>ip>',
                tableTools: {
                    "sSwfPath": "assets/swf/copy_csv_xls_pdf.swf"
                },
                "language": {
                    "processing": "<img src='assets/images/loaders/loader27.gif' class='loader'>"
                },
                "columns": [
                    {"data": 0},
                    {"data": 1},
                    {"data": 2},
                    {"data": 3},
                    {"data": 4, "sortable": false},
                    {"data": 5},
                    {"data": 6},
                    {"data": 7},
                    {"data": 8, "sortable": false}
                ]

            });

            //tfooter search
            table.columns().eq(0).each(function(colIdx) {
                $('input', table.column(colIdx).footer()).on('keyup change', function() {
                    table
                            .column(colIdx)
                            .search(this.value)
                            .draw();
                });
            });
        });
This discussion has been closed.