Re: DB_DataObjects save method
| From: | Alan Knowles | Date: | Sat, 30 Oct 2004 02:49:52 +0000 |
| Subject: | Re: DB_DataObjects save method | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34175@lists.php.net to get a copy of this message | ||
It could, but I suspect it would add alot of needless bloat for a rarely used method.
I think the insert/update route would be safer.
Regards
Alan
Andrew Nagy wrote:
Alan Knowles wrote:technically it should be called replaceInto(), as that's the only SQL (albeit non standard) command that emulates that behavior.. - as the API follows SQL as close as possible..Can db_dataobject detect if a sql query syntax is available? Since this is not a standard, it would be nice if this function could determine if it is supported by the current db and if so call the query otherwise use some logic to determine whether or not to call insert or update. I don't know enough about the inner workings of DB and DO, maybe the database driver would have this? Or would it not be worth calling the sql directly and just using the insert or update? Andrew