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 previous 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);
		
...
 
Read Message
Read Message
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 20:47:07 EST 2024

Total time taken to generate the page: 0.01026 seconds