mrchimp/core — Issue #3: executeSQL return values
Author: mrchimp
Created: 2011-11-30 10:43:34+00:00
State: open

executeSQL() returns an array of data from fetchAll() which is fine for select statements but for insert/update/delete we really want to return the result of execute() as that returns a true or false value.

In my previous database class (I can send you a copy of to look at if you like) I had get_row(), get_recordset() and get_value() for select statements (though these could have been combined into one) as well as insert() which returned the auto-incremented id of the last record inserted and execute() for all other sql queries which returned the number of rows affected.

Really you only need number of rows affected with update and delete queries, create/drop should return true/false.

Hmm.