Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 124

Trouble filtering server-side data

$
0
0
Hi guys,

So I got server-side processing working and doing all I need it to do in my application with on exception, entering any text into the filter/search box crashes it. sProcessing is triggered and never goes away and nothing happens. I have my code below...any ideas on what could be causing this? (I have 'pushed extra data to the sender' which is all working well and giving me the desired result)

Initialization:


Server Side (PHP) code:

[code]
<?php

$aColumns = array('id', ' ', ' ', 'fname', 'lname', 'email_address', 'username', 'type_id', 'phone', 'profile_image',
'address1', 'address2', 'country', 'state', 'city', 'zipcode',
'shipping_address1', 'shipping_address2', 'shipping_country', 'shipping_state', 'shipping_city', 'shipping_zipcode');


/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "id";

/* DB table to use */
$sTable = "users";

/* Database connection information */
$gaSql['user'] = "gateway";
$gaSql['password'] = "picard!picard!";
$gaSql['db'] = "solomon-beta";
$gaSql['server'] = "us-west-2-mysql-vpc-instance1.c6ukgbmvu5lk.us-west-2.rds.amazonaws.com";


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* If you just want to use the basic configuration for DataTables with PHP server-side, there is
* no need to edit below this line
*/

/*
* MySQL connection
*/
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );

mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );


/*
* Paging
*/
$sLimit = "";
if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )
{
$sLimit = "LIMIT ".mysql_real_escape_string( $_GET['iDisplayStart'] ).", ".
mysql_real_escape_string( $_GET['iDisplayLength'] );
}


/*
* Ordering
*/
if ( isset( $_GET['iSortCol_0'] ) )
{
$sOrder = "ORDER BY ";
for ( $i=0 ; $i array()
);

// ChromePHP::log('whatttaaadfasfd');

while ( $aRow = mysql_fetch_array( $rResult ) )
{
$row = array();
for ( $i=0 ; $i


[/code]

THanks again for any help.

Viewing all articles
Browse latest Browse all 124

Trending Articles