Another MDB2 portability question
| From: | Dmitri | Date: | Mon, 07 Apr 2008 19:26:43 +0000 |
| Subject: | Another MDB2 portability question | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28752@lists.php.net to get a copy of this message | ||
Hello again!
I often use the INSERT IGNORE in my scripts, but not that I want my scripts to be database independant, I need to know if this is a mysql-specific or is it a portable statement in MDB2 class.
INSERT IGNORE is very convenient in case when you have a unique index and want to insert a new record but don't know in advance if it already has a row with the same value.
Sure, you can do a SELECT first to check if you have such value, but that's an extra database call and a few extra lines on code....
Thank you for your advice.
--
Open Source ALL content management
with streaming video
http://wiki.sharedlog.com