Will Tomlinson wrote:
> On my clothing database, I have a situation where I have to delete from one
> FK table, then the PK table. I do it in one cfquery like so:
>
> <cfquery datasource="#DSN#">
> DELETE FROM dbo.tblavailablecolors WHERE prodID='#URL.ID#';
> DELETE FROM dbo.tblproducts WHERE prodID='#URL.ID#'
> </cfquery>
This might fail once you start using cfqueryparam (depends on how
your dbms and JDBC driver interpret the standard).
> I started thinking about my product insertion scenario. It runs though 4
> inserts with multiple cfquerys on one page. Why couldn't I place all of them
> into one cfquery? Wouldn't it execute faster? Or is this a tacky way to do
> things?
INSERT INTO table (field1, field2)
VALUES (value1, value2),
(value3, value4),
(value5, value6),
(value7, value8)
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190409
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54