Subject [firebird-support] Multiple select inside procedures and PHP???
Author John Jaabæk
Thank you Helen.

Any chance of getting a stack owerflow using the 'for do'?

The procedure works just perfect by itself.

I'm working with PHP5, odbc-driver 2.0 for Firebird 1.5
This is a part of the PHP-code:

$FirmaQuery = "Select ID_KATEGORI, KATEGORI, ID_LEVERANDOR, LEVERANDOR, ";
$FirmaQuery .= "URL, KALKURL ";
$FirmaQuery .= "from view_presentasjon ";
$FirmaQuery .= "where Kategori like '$useKategori' ";

$FirmaQuery2 = "EXECUTE PROCEDURE SEL_PROC_V_PRESENTASJON ('$useKategori')";

$Result = odbc_do($Connection, $FirmaQuery); /***** Gives all wanted rows ***/

$Result = odbc_do($Connection, $FirmaQuery2); /***** Gives 1 row random ****/

Does anybody really know why?

On Sunday 01 May 2005 07:02, Helen Borrie wrote:
> At 11:51 PM 30/04/2005 -0400, Fernando Buitrago wrote:
> >You'v to select 1 record into procedures, using select first 1 from
> >xxxxx or use a bucle.
> >You can not extract more then one record from a select.
> >regards
> >Fer
>
> Completely incorrect. The FOR SELECT....INTO <variables> DO syntax
> provides a set of rows through which your procedure execution can loop and
> optionally output, row-by-row, as a multiple output set, using SUSPEND.
>
> And using SELECT FIRST n in procedures is expensive and pointless, since
> you can get the same set much more efficiently and cheaply in an ordered
> FOR...SELECT loop.
>
> ./heLen
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>

--

John H. Jaabæk
tlf. +47 915 24 599
Uavhengig Velværekonsulent for Nikken
http://www.nikken.com
http://www.nikkenuk.com
http://www.5pillars.com