Re: Db_dataobject insert()
| From: | Larry Garfield | Date: | Thu, 27 Jan 2005 21:47:52 +0000 |
| Subject: | Re: Db_dataobject insert() | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17229@lists.php.net to get a copy of this message | ||
mishal@centrum.cz wrote:
JP> I'm not sure what the issue is, then. Please check the mailing list JP> archives as I know others have had this problem. I found that this problem have had users before. In this: http://marc.theaimsgroup.com/?l=pear-general&m=110054613417769&w=2 thread is said that db_dataobject insert method returns true, false or 0. I tried to downgrade my db_dataobject installation to version 1.4 and now it *WORKS*. $do->insert() now returns last_insert_id. i found that in newer versions of DO insert() returns true.I'd file that as a bug, then. The documentation still says it returns the ID of the created record, and frankly that's a much better return value than just true or false. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson