Is there an easy way to test whether a value exists in a SQL table, so that I can do something like this in a ZSQL Method: <dtml-if> [here follows the test for the existence of a value in a table] insert items into table </dtml-else> update item in table </dtml-if> This problem probably came along before on the lists, but I can't find it anymore... Rik
In article <38E1D30A.2B65E5BA@inghist.nl>, Rik Hoekstra <rik.hoekstra@inghist.nl> writes
<dtml-if> [here follows the test for the existence of a value in a table] insert items into table </dtml-else> update item in table </dtml-if>
This problem probably came along before on the lists, but I can't find it anymore...
How about <dtml-in "sqlFindItem(item=itemid)"> <dtml-if sequence-start> do insert </dtml-if sequence-start> <dtml-else> do update </dtml-in> ------- Regards, Graham Chiu gchiu<at>compkarori.co.nz http://www.compkarori.co.nz/x.php?/Auctions http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin
participants (2)
-
Graham Chiu -
Rik Hoekstra