Transactions and AffectedRows |
Morning all,
Quick question for yall. When I am running a DB transaction, if it all goes smoothly (as reported by the transaction) I want to do a secondary check (yes I am paranoid on this front), of my own with affectedRows() but its always returning 0 whether the result of the query(ies) themselves were successful or not. Is this by design and I should just rely on what the transaction reports and bypass the affectedRows() function altogether? Extremely oversimplified example: PHP Code: $sql1 = "INSERT INTO tbl1(id,field1) VALUES(?,?); The false result array in the affectedRows seems to always return on success or not. Should I try a manual transaction or would that return the same as the automatic transaction above? |
Welcome Guest, Not a member yet? Register Sign In |