RE: Re[2]: [PHP4BETA] Stored Procedures and ODBC
| From: | Samuel Liddicott | Date: | Thu, 28 Oct 1999 07:36:22 +0000 |
| Subject: | RE: Re[2]: [PHP4BETA] Stored Procedures and ODBC | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5745@lists.php.net to get a copy of this message | ||
I know, but the querystring might look like:
[forgive me, I use phplib]
$db_personel->query("MyStoredProc('$name');");
Sam
> -----Original Message-----
> From: Frank R. Gross [mailto:gross@arkana.de]
> Sent: Wednesday, October 27, 1999 07:23 PM
> To: Samuel Liddicott
> Cc: php4beta@lists.php.net
> Subject: Re[2]: [PHP4BETA] Stored Procedures and ODBC
>
>
> 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.
>