note 63371 deleted from function.mysql-affected-rows by bjori

From: Date: Tue, 21 Mar 2006 15:35:48 +0000
Subject: note 63371 deleted from function.mysql-affected-rows by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106158@lists.php.net to get a copy of this message
Note Submitter: prophp at gmail dot com ---- In case you use PEAR::DB and like to write explicit multiple line queries like this: $query = " /* $debug_info */ REPLACE ..."; so that the SQL is nice formatted, easy to read etc. Unfortunatelly this breaks the PEAR $db->affectedRows() that returns always 0: Fix: you need to put the REPLACE/INSERT word immediately after the double quote: $query="REPLACE /* $debug_info */ ..."; (reason is in DB::isManip() in case you're wondering).

« previous php.notes (#106158) next »