[eluser]Rob Corley[/eluser]
Hello,
I am wondering if multiple consecutive $db->query() calls are always going to be called in the same MYSQL thread?
For example if I execute the following code, will it always work:-
Code:
$this->db->query('SET @var=1');
$this->db->query('SELECT @var');
The reason for doing this is I want to setup record versioning using MYSQL triggers, but I want to be able to include the user id in the trigger. So I need to save this in a mysql user variable each time I run a query on the versioned tables.
I guess if the answer is no, then I will need to use transactions.