-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I'm having a problem with inserting into this table:
CREATE TABLE `read_notices` (
`ownerid` int(11) NOT NULL,
`noticeid` int(11) NOT NULL,
`read` datetime NOT NULL,
KEY `IDX_MAIN` (`ownerid`,`noticeid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1The reason is that unlike update(), insert() does not contain this line:
$this->count = $stmt->affected_rows;Therefore, inserts without an insert id end up returning 0. For these inserts, checking count would suffice to know that the insert succeeded, if count were set.
Suggestion: please set count after an insert()
Thanks!
Metadata
Metadata
Assignees
Labels
No labels