Subject RE: [firebird-php] SPs Docs
Author Alan McDonald
why is that so important a task Nigel? What's wrong with a 2 step procedure?
-----Original Message-----
From: Nigel Weeks [mailto:nweeks@...]
Sent: Wednesday, November 17, 2004 3:22 PM
To: firebird-php@yahoogroups.com
Subject: RE: [firebird-php] SPs Docs


Yes, normal usage is a single transaction, but it's not always the case.

The other problem is that the 'Firebird Elite' have frowned upon
the practice of using a 'Selectable Procedure' to do both:
A DML operation (Insert/Update/Delete), and
A return of a record set(via the suspend)

Sure, it's possible, and I like using Procs in this way A LOT!!, but I've
heard
it's just not the right way to do it...

It's been recommended that the following should be adhered to:
'Execute Procedures' should be used for DML ops (Ins/Upd/Del), and
'Selectable Procs' should only be used for returning datasets, fancy
queries, etc.
-> No data changes.

I dunno yet, I can't think of a better way:
There's a six-pack of Cascade Beer for anyone who can solve it!

Summary of Challenge: Insert a row, and return the new generator-seeded ID
in ONE COMMAND/ONE QUERY from PHP, without using a selectable stored
procedure to do it...

Nige.


Yahoo! Groups Sponsor

Get unlimited calls to

U.S./Canada




----------------------------------------------------------------------------
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/

b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



[Non-text portions of this message have been removed]