[PHP] PHP4 Oracle SELECT statement ERROR
Hi I am a programmer and I just started using PHP4. I created a view in Oracle (code below) and I added an underscore to the end of one of the column names ("id_number_"). When I use asp code to select from this view I have to write a select statement like so: "Select * from view_specimen_details where id_number_=1" However when I use PHP4 with OCI8 I get an error when I try to execute the above statement. Although if I remove the underscore of the variable in the where clause everything works. "Select * from view_specimen_details where id_number=1" I cannot change the view. Does anyone have a workaround for this problem? Thanks in Advance -- Create view create or replace view view_specimen_details as SELECT a.ID_NUMBERid_number_, FROM catalogue -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP4 Oracle SELECT statement ERROR
I have also noticed that when I retreive values from a view into an associated array I will not get the proper name of the field. For example if I create a view like : create or replace view view_specimen_details as SELECT a.ITEM_CLASS "order", a.FIELD2 "scientific name", a.FIELD16"common name", FROM catalogue a foreach ($resultSet[0] as $fN => $fV) { echo $fN; echo $fV; echo ""; } I will get : ITEM_CLASS [value] FIELD2 [value] FIELD16 [value] What I want is : order [value] scientific name [value] common name [value] Does anyone have a work around? "Notoriousvic_ca" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi I am a programmer and I just started using PHP4. > > I created a view in Oracle (code below) and I added an underscore to the end > of one of the column names ("id_number_"). > > When I use asp code to select from this view I have to write a select > statement like so: > "Select * from view_specimen_details where id_number_=1" > > However when I use PHP4 with OCI8 I get an error when I try to execute the > above statement. Although if I remove the underscore of the variable in the > where clause everything works. > > "Select * from view_specimen_details where id_number=1" > > I cannot change the view. Does anyone have a workaround for this problem? > > Thanks in Advance > > -- Create view > create or replace view view_specimen_details > as SELECT a.ID_NUMBERid_number_, > FROM catalogue > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Oracle 8 Functions Efficiency Problem
I have an HTML form which allows users to query data in an Oracle 8 Database. Usualy a search may return over 100 records so I diplay 10 records per page. I would like to make the search more efficient by using the OCISetPrefetch to prefetch the first 10 records. This works great for the first page but for a page that displays records 90 to 100, I have to prefetch 100 records. I have two questions 1) Is there any way of fetching or Prefetching only say rows 80 to 90 of a result set? 2) Has anyone tried to save a cursor or connection into a session? Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting all files in a directory
Is there anyway I can get all the file and directories in a specific directory? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php