note 118095 added to sqlite3.changes

From: Date: Fri, 02 Oct 2015 16:10:54 +0000
Subject: note 118095 added to sqlite3.changes
Groups: php.notes 
Request: Send a blank email to php-notes+get-203896@lists.php.net to get a copy of this message
There is an issue that may be meant or not, but in my case is annoying. If you have have a schema like the following: [code] pragma foreign_key = on; create table parent ( id integer, a varchar, primary key (id asc) ); create table child ( id integer, b varchar, a integer, primary key (id asc), foreign key (a) references a (id) on delete cascade on update cascade ); [/code] When you try to delete a parent row (delete from parent where parent.id=?) it deletes all the childs referenced to this parent, but the method SQLite3::changes() is still returning 1, as if it only have deleted the parent. ---- Server IP: 72.52.91.14 Probable Submitter: 79.145.61.16 ---- Manual Page -- http://php.net/manual/en/sqlite3.changes.php Edit -- https://master.php.net/note/edit/118095 Del: integrated -- https://master.php.net/note/delete/118095/integrated Del: useless -- https://master.php.net/note/delete/118095/useless Del: bad code -- https://master.php.net/note/delete/118095/bad+code Del: spam -- https://master.php.net/note/delete/118095/spam Del: non-english -- https://master.php.net/note/delete/118095/non-english Del: in docs -- https://master.php.net/note/delete/118095/in+docs Del: other reasons-- https://master.php.net/note/delete/118095 Reject -- https://master.php.net/note/reject/118095 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203896) next »