Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Unexpected "Query was empty" Error Due to Space / Newline
Unexpected "Query was empty" Error Due to Space / Newline [message #4606] Sun, 26 October 2014 09:33 Go to next message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
When calling executeQuery($query) function with $query containing spaces and/or newlines after the last ";" in $query string, the function will return "Query was empty" error. To make the function more user friendly, especially in cases when $query contains multiple sql statements, propose to add a line in executeQuery function as follows:
...

$DML->setRowLocks($this->row_locks);
	
$query = trim($query); // added this line to solve unexpected "Query was empty" error

$result = $DML->multiQuery($this->dbname_server, $this->tablename, $query);
		
...
Re: Unexpected "Query was empty" Error Due to Space / Newline [message #4608 is a reply to message #4606] Sun, 26 October 2014 11:12 Go to previous message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
I will include this in the next release.

Previous Topic: Generate php - Page not found
Next Topic: Unexpected "Cannot extract token from" Error Due to Tabs / Newlines
Goto Forum:
  


Current Time: Sun Dec 22 10:05:45 EST 2024

Total time taken to generate the page: 0.02684 seconds