From Any way to select without causing locking in MySQL? I found a way to implement a select query in a InnoDB table without locking.
The example code given there is the following.
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ; SELECT * FROM TABLE_NAME ; COMMIT
If I want to implement a similar statement using
db_query(), can I do so by issuing three consecutive calls like the following code?
db_query("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED") db_query("SELECT * FROM TABLE_NAME") db_query("COMMIT")
db_query() doesn't support multi-line statements, on Drupal 6.