Home  >  Article  >  Backend Development  >  pdo operation makes sqlite compatible with more sql statements.

pdo operation makes sqlite compatible with more sql statements.

WBOY
WBOYOriginal
2016-07-25 08:47:59938browse
Add sqlite custom function to make it compatible with more sql statement operations.
                 
                                                                                                                                                                                                                                                                                                                  


if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'sqlite') {
          $db->sqliteCreateFunction('concat', create_function('',"return implode(func_get_args()) ;"));
    }
  1. Copy code
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn