Preparing SQL Statements with PDO

后端 未结 4 1097
面向向阳花
面向向阳花 2021-01-15 12:59

My code looks like this:

// Connect to SQLite DB
DB(\'/path/to/sqlite.db\');

DB(\'BEGIN TRANSACTION;\');

// These loops are just examples.
for ($i = 1; $i          


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-15 13:11

    The DB function as originally posted issues a filesystem stat() system call each time it is run to check if the query string is a file. While that isn't solely responsible for the slow execution, it contributes to it.

提交回复
热议问题