This function prepends backslashes to the following characters: \x00 , \n , \r , \ , ' , " and \x1a . This function is normally used to make data safe before sending a query to MySQL . 
PHP has similar functions for other database systems such as pg_escape_string() for PostgreSQL . The function addslashes(string $str) works for escaping characters, and is used especially for querying on databases that do not have escaping functions in PHP. It returns a string with backslashes before characters that need to be quoted in database queries, etc. These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte). 
Routinely passing escaped strings to SQL is error prone because it is easy to forget to escape a given string. Creating a transparent layer to secure the input can reduce this error-proneness, if not entirely eliminate it. 
In Toronto, city council recently voted to approve three sites to host supervised injection. The Toronto Board of Health is already backing the application. Now, like in Ottawa, it’s just a matter of compiling the materials to send to the feds. And in Vancouver, on top of the two supervised injection services already running, there are approximately five more in the works. Patricia Daly, chief medical officer for Vancouver Coastal Health, is hoping the applications will be ready to go for the fall. Even for Daly and her team, who already have experience developing two services, the application process has been daunting. “We’ve had to devote significant staff resources to get the applications together to meet all the criteria in that act,” she says. “That is a big hurdle for people.”
A mayoral task force on the opioid crisis recommended that the city consider safe injection sites last May. In the summer, officials worked to close encampments around Kensington, closed a decades-old camp in a train gulch along Gurney Street , and bricked up an abandoned church that had become a shelter for young people using heroin among the ruined pews. Though the spaces were dangerous and decrepit, for many they offered the only safe places where they could inject heroin around friends who could administer Narcan if they overdosed.