Page 1 of 1

Newbie - Question3 - using SQLInsert .. SQLdelete

Posted: Sat 29 Jul 2006 02:29
by Edison Garcia
I had readed some questions and aswers about how to use the SQLDelete, SQLupdate strings in MyQuery component, but it is not clear to me. If I do not have to put any text in this strings, and then basic instruction is an "execute", it comes to me the following doubts:
1 - if it is not to use something like an "executeDelete", for instance, and I have to use just "execute", how to define with operation (delete, insert... ) will be executed, since all the strings (delete, update, insert...) are there ?
2 -for instance, in the case of a "delete". Which record will be deleted, the current one ? or if I will use something like 'where xxx = :param', where to indicate the param value ?

The possibility of have insert, delete,update strings in the same query comp. is very nice, but the use of then is not clear to me.

thank you
Edison

Posted: Sun 30 Jul 2006 19:45
by swierzbicki
You don't have to modify the insert/update/delete properties.
The insert/upate/delete properties are interresting when working with complex SQL queries (using inner joins, nested statements...)

The insert/update/delete statement will be executed upon the current record only