Escape Special Characters in SQL Queries


Quick note about some SQL Escape characters:

In SQL you get to define the escape character like so:

select *
from Item
where Name like '%/_%' escape '/'

In this example you will be finding anything in the 'Item' table which contains an underscore anywhere in the 'Name' column. The above syntax is equivalent to:

select *
from Item
where Name like '%=_%' escape '='

Which is equivalent to:

select *
from Item
where Name like '%~_%' escape '~'


For more SQL Escape character information, refer to:

http://www.orafaq.com/wiki/SQL_FAQ#How_does_one_escape_special_characters_when_writing_SQL_queries.3F


Fatal error: Uncaught Whoops\Exception\ErrorException: session_write_close(): write failed: No space left on device (28) in Unknown:0 Stack trace: #0 /var/www/html/system/src/Grav/Common/Debugger.php(847): Whoops\Run->handleError(2, 'session_write_c...', 'Unknown', 0) #1 [internal function]: Grav\Common\Debugger->deprecatedErrorHandler(2, 'session_write_c...', 'Unknown', 0, NULL) #2 [internal function]: session_write_close() #3 {main} thrown in Unknown on line 0