Thread: implied rows when a rule gets executed.

implied rows when a rule gets executed.

From
"J.Fernando Moyano"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


In a rule... is there some way of getting the number of rows updated by the 
query that activates this rule ??

Martín Marqués says:

>You'll have to do more advance programing there. See if count(*) can help 
>you 
>in any way.
>I see you have to update usadas=(usadas-1). Try something like:
>
>usadas=(usadas-(select count(*) from piezas WHERE condition_delete) )


... but, how can i know "condition_delete" ???

If there is no way ... i will try with triggers ... but i think it's little 
simetrical .....  ==> i can get done my stuff with rules when inserting, but 
it isn't possible when deleting ???

Thanks .....

- -- 
Fernando Moyano

Frase del día:
- --------------
Fuerza tu OS/2 a OS/4!!.

(*) SymeX ==> http://symex.lantik.com
(*) WDBIL ==> http://wdbil.sourceforge.net
(*) Informate sobre LINUX en http://www.linux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7C1eRoZaf9MvtDvcRAuqCAJ97HFg61+yJnRgn/Ulkd++paWTWRACfVBXQ
RslGvE5sh1IBYO1s4P36nXo=
=Tlk4
-----END PGP SIGNATURE-----