Reply to stored procedure results Question

Your name:

Reply:


Posted by buzz on 03/06/07 05:38

Hello most excellent and knowledgable PHP gurus
i have a small question regarding accessing elements in a cursor which
i hope is ok to ask,.

the following code works and i'm very pleased with myself

$the_cursor = OCINewCursor($conn);
$stmt2 = OCIParse($conn, "begin
gi_rio_api.get_road_asset_data_headers(:myset); end;");
OCIBindByName($stmt2,":myset",&$the_cursor ,-1,OCI_B_CURSOR);
OCIExecute($stmt2);
OCIExecute($the_cursor);
while (OCIFetchInto($the_cursor,&$myset,OCI_B_CURSOR))

{
$column_name = $myset[1]; //
$column_desc =$myset[0];
$column_array [] = array( $column_name,$column_desc);
}

however, the database weenies tell me that they'll eb modifying stuff
onthe fly so i cant count on correct index values

how do i change the above code so i can access the fields in the
cursor by column name?

i'd ideally like to just put something like
$column_name = $myset['COLUMN_NAME']; ..etc
what am i missing which would solve my quandry?

regards and than you's

Buzz

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация