Quoting T. Stoffels (suppressed):
> I just was pointed towards a different, imho more simple approach:
> I just do the begin..query..query..commit/rollback stuff myself =)
> --
> [tmp mysqlresult_begin][query sql=|begin work|][/query][/tmp]
>
> [tmp mysqlresult_del1][query sql=|delete ...|][/query][/tmp]
>
> [tmp mysqlresult_del2][query sql=|delete ...|][/query][/tmp]
>
>
> [if type=explicit compare="
> $Scratch->{mysqlresult_begin} == 1 &&
> $Scratch->{mysqlresult_del1} == 1 &&
> $Scratch->{mysqlresult_del2} == 1
> "]
> [query sql=|commit|][/query]
> everything deleted
>
> [else]do rollbackhere [/else]
> [/if]
This won't work for a number of reasons.
First, you need to have [query row-count=1 ....] or [query list=1 ....][sql-
code][/query] to get a row count back.
Second, unless you set AutoCommit to 0 in the database configuration,
you won't be in transactions mode and your commit won't do anything.
IMHO, using the [query ...] ITL tag for setting database values is not
a good idea. It doesn't give you the kind of control you need. It is
better to either use DBI or to use Interchange's supplied methods
(set_slice, delete_record, etc.).
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <suppressed>
Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.