[TYPO3-dev] Raising Mysql requirements to 4.1?

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Oct 1 16:42:45 CEST 2007


ries van Twisk schrieb:
> 
>>
>> Intersting is also that the Mysql version does an UPDATE but we have
>> DELETE/UPDATE pair on other DBs. Shouldn't that be a SELECT/UPDATE/INSERT
>> triple?
> I am not sure what you mean actually..
> In the above case Dmitry just tries to insert or update a record.

What he does is (rewriting the ON DUPLICATE KEY)

if Mysql
   SELECT
   if row exists UPDATE else INSERT
else
   DELETE
   INSERT
end

This is not the same!

> so then we get, which makes the whole system more transaction correct..
> 
> $record=select record
> if (record) {
>     update record with new timestamp
> } else {
>     insert new record
> }

Exactly!

Masi




More information about the TYPO3-dev mailing list