Re[2]: [PHP4BETA] Stored Procedures and ODBC
| From: | Frank R. Gross | Date: | Wed, 27 Oct 1999 18:22:50 +0000 |
| Subject: | Re[2]: [PHP4BETA] Stored Procedures and ODBC | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5733@lists.php.net to get a copy of this message | ||
SL> Surely you just put together the sql text that calls the procedure and then
SL> execute it as any other sql query?
SL> Sam
Hi Sam,
the main benefit of "stored procedures" is that the query string
itself is contained in the db and not in the html/php file. So, if the
structure of the db changes you don't have to update the query string
in the php file. You simply call the stored procedure within the
database. That's the way it works with ASP.
Think of SQL queries like this one:
"SELECT DISTINCT [@FIRMA].FIRMA_ID, [@FIRMA]![Firma1] & " " &
[@FIRMA]![Firma2] & " " & [@FIRMA]![Firma3] AS Firma, [@FIRMA].Straße,
[@FIRMA]![Plz] & " " & [@FIRMA]![Ort] AS PLZ_Ort
FROM (([@FIRMA] LEFT JOIN [@EMail_Adressen] ON [@FIRMA].FIRMA_ID =
[@EMail_Adressen].Firma_ID) LEFT JOIN [@FTP_Zugang] ON
[@FIRMA].FIRMA_ID = [@FTP_Zugang].Firma_ID) LEFT JOIN..."
... etc. pp. ;-)
As I wrote before I read about "executing complex stored procedures"
in the php3 manual at
http://www.php.net/manual/function.odbc-connect.php.
But how can one execute these "complex stored procedures" using
php...?
Regards,
Frank.