If there is new line, tab in SQL string, in the $count_query will be mailfunctioning.
I give a solution for this problem. (The format of patch is not correct but it works)

// $Id: ajaxtable.module,v 1.3.2.7 2008/04/30 20:37:31 stompeers Exp $

//358
// $count_query = preg_replace('/SELECT (.*) FROM/','SELECT COUNT(' . $count_inner . ') FROM',$table['query']);
$_tquery = preg_replace(array('/\n/','/\r/','/\t/'),array(' ',' ',' '),$table['query']);
$count_query = preg_replace('/SELECT (.*) FROM/i','SELECT COUNT(' . $count_inner . ') FROM',$_tquery);

Comments

svogel’s picture

Status: Active » Closed (duplicate)

Hi there,

I would say this is a duplicate to 240252
Best regards
Stefan