New Line or Tab in the SQL

Fabio61 - August 24, 2008 - 21:29
Project:Ajax Table
Version:5.x-1.2
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

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);

#1

svogel - February 15, 2009 - 15:26
Status:active» duplicate

Hi there,

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

 
 

Drupal is a registered trademark of Dries Buytaert.