Patches item #1665077, was opened at 2007-02-21 10:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1665077&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Henning Westerholt (henningw)
Assigned to: Nobody/Anonymous (nobody)
Summary: insert on duplicate key update function for db, mysql

Initial Comment:
Hello,

The current replace function replaces a row in the db, if it exists. Prior to 
the insertion the old row is deleted. 

For some situations a function that uses the INSERT, ON DUPLICATE KEY UPDATE 
call, thus preserving old data that is not overwritten, is very convenient. 
We're using this function a lot in our modules. 
This attached patch implements suchs a function, so called  "insert_update". It 
adds the some code to the db interface, and the mysql module. 

I know this syntax is a MySQL extension that is not present in PostgreSQL. But 
it is of course possible to implemented a similar feature with some SQL 
statements there.

Regards,

Henning

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1665077&group_id=139143

_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to