php-db | 2000121
Date: 12/01/00
- Next message: Andreas Karajannis: "Re: [PHP-DB] oracle8"
- Previous message: Dave Fudge: "RE: [PHP-DB] oracle8"
- Maybe in reply to: Dave Fudge: "[PHP-DB] oracle8"
- Next in thread: Andreas Karajannis: "Re: [PHP-DB] oracle8"
- Reply: Andreas Karajannis: "Re: [PHP-DB] oracle8"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ammendment,
is there a way to get both OCIFetchSTatement and OCIFetchInto
without using OCIExecute() twice?
-----Original Message-----
From: Dave Fudge [mailto:fudge <email protected>]
Sent: Friday, December 01, 2000 9:03 PM
To: php-db <email protected>
Subject: RE: [PHP-DB] oracle8
part 2:
is there an easier way than using $i=0
while (OCIFetchInto($sth,&$row,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS))
{
$i = $i+1;
}
to find the number of rows affected by a select?
apparently OCIRowCount won't work.
-----Original Message-----
From: indrek siitan [mailto:tfr <email protected>]
Sent: Friday, December 01, 2000 6:14 PM
To: Dave Fudge; php-db <email protected>
Subject: RE: [PHP-DB] oracle8
Hi,
a very simple example:
<?
$query="SELECT col1,col2 FROM table ORDER BY col1";
$sth=OCIParse($GLOBALS["DBH"],$query);
OCIExecute($sth);
while
(OCIFetchInto($sth,&$row,OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS))
{
?>
<TR>
<TD><?= $row["COL1"] ?></TD>
<TD><?= $row["COL2"] ?></TD>
</TR>
<?
}
OCIFreeStatement($sth);
?>
NOTE: the column names in $row MUST BE uppercase.
hope that helps.
Rgds,
Tfr
--==< tfr <email protected> >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==--
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andreas Karajannis: "Re: [PHP-DB] oracle8"
- Previous message: Dave Fudge: "RE: [PHP-DB] oracle8"
- Maybe in reply to: Dave Fudge: "[PHP-DB] oracle8"
- Next in thread: Andreas Karajannis: "Re: [PHP-DB] oracle8"
- Reply: Andreas Karajannis: "Re: [PHP-DB] oracle8"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

