[Zope] dtml Z SQL doubt

Tino Wildenhain tino at wildenhain.de
Thu Mar 22 05:11:52 EDT 2007


Remil Mathew schrieb:
> Hi all,
> 
> I need to insert a row to mysql table if the corresponding  data not 
> exist, if it exist i need to update the row.
> 
> Can we do it using a single Z SQL method.

Well thats not business of ZSQL methods but rather
stuff you do with the instruments of your database.
Say SQL (or whatever SQL like mysql has there)

IIRC, mysql has some kind of UPSERT which should
handle it. If not, stored procedure or trigger
etc could do it.

Regards
Tino


More information about the Zope mailing list