in reply to DBI help - MS Access random field order
What does $db->DataHash() return? A hash? (Or something like values %hash)? So why do you assign it to an array? Hashes have no defined order, so every single run can give you a different order of columns. It has nothing to do with the ORDER BY clause in your SQL statement.
Corion already said that your code does not look like DBI. Are you using some kind of home-grown DBI wrapper?
Your code is vulnerable to SQL injection, because you don't use placeholders, but instead insert data into the SQL statement(s). It also sabotages statement caching. Change that code to use placeholders.
Alexander
|
|---|