• Page:
  • 1

Error page on wrong SQL query in Joomla

ONLINE

Error page on wrong SQL query in Joomla

4 months, 1 week ago
In Joomla 3.x and abov,e if any of your page has an SQL query which has a wrong syntax, then it will take you to an error page. In earlier versions it used to discard it and execute the next lines of code, but in the newer versions it just stops and throws the user to the error page.

This happens because of the following line written in the execute function of your database driver:

catch (RuntimeException $e)
				{
					// Get the error number and message.
					$this->errorNum = $this->getErrorNumber();
					$this->errorMsg = $this->getErrorMessage($query);

					JLog::add(JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg), JLog::ERROR, 'database-error');

					throw new RuntimeException($this->errorMsg, $this->errorNum, $e); //just comment out this line
				}
The following user(s) said Thank You: Rajat Pal, Vaishali Parmar Padharia
ONLINE

Re: Error page on wrong SQL query in Joomla

2 months, 2 weeks ago
Path of the file to access this code -->

/libraries/joomla/database/driver
The following user(s) said Thank You: Vicky Jain, Rajat Pal
  • Page:
  • 1

Upcoming Events

Who's Online