What is the best way to approach this?

"php 5.3.x + oracle 11g R2 XE 11.2.x.x"
Hello everyone,
I'm quite new to oracle (2-4 months) and php(2 weeks).
I have one query with results that needs to be reused in several parts of my website. I can't seem to find the equivalent of the mysql_data_seek in Oracle. I wanted to reset the cursor/pointer of oci_fetch($result) so that I can scroll the result again.
So far this are what I have come up:
A. On first fetch put the the results in a php array and call the array later on.
B. Do the query again.
C. Keep on looking for a mysql_data_seek equivalent and fail.
I'm leaning towards option 'A' but I just wanted to consult the experts.
Thank you!

Moved to: What is the best way to approach this? (oci_fetch problem)
Edited by: m.davide on Oct 23, 2012 2:21 AM
Edited by: m.davide on Oct 23, 2012 2:22 AM

Similar Messages

  • What is the best way to approach this? (oci_fetch problem)

    "php 5.3.x + oracle 11g R2 XE 11.2.x.x"
    Hello everyone,
    I'm quite new to oracle (2-4 months) and php(2 weeks).
    I have one query with results that needs to be reused in several parts of my website. I can't seem to find the equivalent of the mysql_data_seek in Oracle. I wanted to reset the cursor/pointer of oci_fetch($result) so that I can scroll the result again.
    So far this are what I have come up:
    A. On first fetch put the the results in a php array and call the array later on.
    B. Do the query again.
    C. Keep on looking for a mysql_data_seek equivalent and fail.
    I'm leaning towards option 'A' but I just wanted to consult the experts.
    Thank you!
    Edited by: m.davide on Oct 23, 2012 2:31 AM

    >
    I have one query with results that needs to be reused in several parts of my website. I can't seem to find the equivalent of the mysql_data_seek in Oracle. I wanted to reset the cursor/pointer of oci_fetch($result) so that I can scroll the result again.
    So far this are what I have come up:
    A. On first fetch put the the results in a php array and call the array later on.
    B. Do the query again.
    C. Keep on looking for a mysql_data_seek equivalent and fail.
    I'm leaning towards option 'A' but I just wanted to consult the experts.
    >
    If option A works for you then use it. Oracle has no equivalent to mysql_data_seek.
    The option to use depends on your business requirements. If you know you want exactly the same results you will have to cache the original results. If you redo the query you are NOT guaranteed to get the same results or even the same number of rows.
    Someone could have inserted/deleted/updated rows after you began your first query. Then when you do your second query you would get different results. This means that if you query for the first 100 records a second query to get the next 100 may return some of the same records your first query retrieved and even those 'same' records (based on primary key) may be different if they have been updated.

  • HT1451 I need to move my library from my old computer to my new laptop. What's the best way to do this?

    I need to move my library from my old computer to my new laptop (Windows 8). What's the best way to do this?

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
    tt2

  • Is this possible and the best way to approach this?

    hello all, back again with more questions
    What I would like to do is load an external swf (preloader) into a container swf, when the preloader swf is loaded, run code from the preloader's document class that will check to see if the container swf is fully loaded.  Once the container swf is fully loaded, load in another swf and unload the preloader swf.
    I would like to keep all code in external classes and off timelines while creating a situation where I can load this preloader swf into any parent swf and do that check.  is this possible and the best way to approach this?
    any advice/help would be great.

    Why not just do it the more straightforward/normal way and use the preloader to load your other files? The preloader would load the 'container' you have now, and when it's done load the other swf you mentioned.

  • Narrating Keynote (Voice over slides)?  What is the best way to do this?

    If I have a keynote presentation and I need it narrated (like a a voice over) what is the best way to do this?
    Is it to record an audio file then insert it somehow into the presentation?
    Sorry if this is a dumb question, just not sure how to make it work. I need my boss to do the voice over- so I will probably only get one shot.

    This forum thread offers some options to do this. One simple strategy is to record separate bits of narration for each slide, and simply attach that to each slide. When the presentation is run, the audio file will play for each slide. This approach is much easier than alternatives, but the downside is that it does not allow for narration across slides, which may or may not be important to you. If it is necessary, then you should check out the option (discussed in the thread) of pre-recording the entire narration, then using Soundflower and Keynote's Record Slideshow functionality to create a show with narration.

  • My old computer is dying and I want to transfer my account to my new computer.  I will not be using the old computer at all.  What is the best way do do this?

    I want to stop using my old computer completely and transfer my itunes account to my new computer.  What is the best way to do this?

    A simple search

  • I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. What is the best way to do this

    I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. Even when I save it, the image quality at minimum the file size is 10.9 MB. What is the best way to do this

    @Barbara – What purpose is that PDF for? Print? Web?
    If web purpose, you could convert CMYK images to sRGB. That would reduce the file size as well.
    A final resort to bring down file size is:
    1. Print to PostScript
    2. Distill to PDF
    That would bring file size down even more. About 20%, depending on the images and other contents you are using, compared with the Acrobat Pro method. If you like you could send me a personal message, so we could exchange mail addresses. I could test for you. Just provide the highres PDF without any downsampling and transparency intact. Best provide a PDF/X-4.
    I will place the PDF in InDesign, print to PostScript, distill to PDF.
    Uwe

  • I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard. What is the best way to do this.

    I have just purchased an iphone 4 and it needs me to have the latest itunes on my computer.  I have not upgraded by computer for some time and thought this is probably the time to do it. My computer is an imac intel with Tiger 10.4.11. I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard or higher.  What is the best way to do this?  Appreciate any help as I am out of practice. I used to be an old hand at this, but things have moved on since I didn't upgrade or use my computer as much!

    Catherina wrote:
    ...  What is the best way to do this?
    The best way, really the only way, is to purchase Snow Leopard.
    Online (UK): http://store.apple.com/uk/product/MC573/mac-os-x-106-snow-leopard
    Elsewhere: call the phone number in the Apple Online Store.
    Apple's price is $19.99, £14.00, €18.
    Snow Leopard is not available to download from any legitimate source.
    Once you install Snow Leopard, upgrade iTunes to version 10.7 or the latest, iTunes 11.
    iTunes 10.6.3 is the last version of iTunes to support Mac computers with Mac OS X 10.5.8 with either Intel or PowerPC processors, but since you have an Intel iMac, the best solution is to purchase Snow Leopard. Leopard is no longer available from Apple and prices from aftermarket vendors can be unreasonably high.

  • Urchased a new desktop pc and I want to move itunes and all files including IPAD apps to my new computer and delete off my old one.  What is the best way to do this?

    I just purchased a new desktop PC and want to move Itunes and all my Ipad Apps to new computer, and delete off my old computer.  What is the best way to do this?

    Hi,
    See Here for Transferring your iTunes Library
    http://support.apple.com/kb/HT4527
    Make sure Everything is working to your satisfaction Before Deleting anything from your old computer...
    Cheers,

  • What's the best way for reading this binary file?

    I've written a program that acquires data from a DAQmx card and writes it on a binary file (attached file and picture). The data that I'm acquiring comes from 8 channels, at 2.5MS/s for, at least, 5 seconds. What's the best way of reading this binary file, knowing that:
    -I'll need it also on graphics (only after acquiring)
    -I also need to see these values and use them later in Matlab.
    I've tried the "Array to Spreadsheet String", but LabView goes out of memory (even if I don't use all of the 8 channels, but only 1).
    LabView 8.6
    Solved!
    Go to Solution.
    Attachments:
    AcquireWrite02.vi ‏15 KB
    myvi.jpg ‏55 KB

    But my real problem, at least now, is how can I divide the information to get not only one graphic but eight?
    I can read the file, but I get this (with only two channels):
    So what I tried was, using a for loop, saving 250 elements in different arrays and then writing it to the .txt file. But it doesn't come right... I used 250 because that's what I got from the graphic: at each 250 points it plots the other channel.
    Am I missing something here? How should I treat the information coming from the binary file, if not the way I'm doing?
    (attached are the .vi files I'm using to save in the .txt format)
    (EDITED. I just saw that I was dividing my graph's data in 4 just before plotting it... so It isn't 250 but 1000 elements for each channel... Still, the problem has not been solved)
    Message Edited by Danigno on 11-17-2008 08:47 AM
    Attachments:
    mygraph.jpg ‏280 KB
    Read Binary File and Save as txt - 2 channels - with SetFilePosition.vi ‏14 KB
    Read Binary File and Save as txt - with SetFilePosition_b_save2files_with_array.vi ‏14 KB

  • Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Once the user has entered the URL they want to add to the form. You can use the loadXML function to implement some special text in a label...
    var linkValue = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><exData contentType=\"text/html\" xmlns=\"http://www.xfa.org/schema/xfa-template/2.8/\"><body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"Acroform:2.7.0.0\" xfa:spec=\"2.1\"><p style=\"font-weight:bold;text-decoration:none;letter-spacing:0in\">The new link the user have entered is:<a href=\"" + textfield.rawValue + "\">textfield.rawValue</a></p></body></exData>";
      this.resolveNode("lblURL").value.exData.loadXML(linkValue, 1, 1);

  • I have two videos and I would like to use parts of both videos with one audio track what is the best way to edit this?, I have two videos and I would like to use parts of both videos with one audio track what is the best way to edit this?

    In Final Cut Express I have two videos I'd like to merge parts of each video into a final film.  What is the best way to do this in FCE?

    Hi
    I use a slightly different way than Alchroma.
    Same
    • One video on track 1 and the other on Video.track 2
    • Resize to 25% and move one to the left and the other to the right
    Diff
    • I don't use the blade tool
    • I use the Pen tool and change the transparency - then I get fast or slow transitions in same stroke and easy to fine-tune later if needed. (But this can be done with the Roll-tool if Blade is used - so it might be as easy)
    Final
    • Resize to 100% and Center
    Video is done
    Audio - very close to this by changing the level so that best audio will dominate
    • Pen tool here too
    But that's me - the Alchroma way is as good as this or may be better for some
    Yours Bengt W

  • Contacts Sync - I have my contacts on iphone5 and MacBook Pro 2012.  I just purchased a MacBook Air 2013 and want the same contacts on that device.  What is the best way to do this?  Non-techie.  Thanks

    I have my contacts on iphone5 and MacBook Pro 2012.  I just purchased a MacBook Air 2013 and want the same contacts on that device.  What is the best way to do this?  Non-techie.  Thanks

    Follow the instructions for enabling your iCloud account on the MBAir here >  Apple - iCloud - Learn how to set up iCloud on all your devices.

  • When I upgrade from OS10.5.8 to Snow Leopard will all my data transfer.  If I need to back up what is the best way to do this?

    I plan to upgrade from OS10.5.8 to Snow Leopard. Will all my data, applications and settings transfer automatically?
    If I need to back up what is the best way to do this?

    If everything works perfectly, your data should not be touched.
    Personally I never trust my data to everything working perfectly.
    I always backup everything twice at least.

  • I would like to put the results of a proc on a local database into a table in my azure db. What is the best way to do this?

    I would like to put the results of a proc on a local database into a table in my azure db.  What is the best way to do this?  I dont see the ability to link.  The local db is on my desktop and is mssql12.
    McC

    I am not sure if i set up the linked server correctly here is the schema and an attempt to run a select and the resulting error:
    SELECT  *
    FROM  [CN5E6E9LM2.DATABASE.WINDOWS.NET,1433].[Mkerr_db].dbo.addr
    OLE DB provider "SQLNCLI11" for linked server "CN5E6E9LM2.DATABASE.WINDOWS.NET,1433" returned message "Unspecified error".
    Msg 40515, Level 16, State 2, Line 1
    Reference to database and/or server name in 'Mkerr_db.sys.sp_tables_info_90_rowset_64' is not supported in this version of SQL Server.
    McC

Maybe you are looking for

  • How do you launch from within "Finder" a file to open in nano?

    So i want to be able to click on a file found in Finder and have it open in /user/bin/nano

  • SQL Select using LEFT OUTER JOIN returning field values when I expect NULL

    I am having problems with this select statement: SELECT distinct pl.id, th.trip, pc.country, pph.location FROM people_list pl, people_travelhistory th, people_country pc LEFT OUTER JOIN people_info pph on pph.id=pl.id and pph.country=pc.country where

  • Help with view link

    Hi, I have created a view link in the bc4j layer based on 2 views created in bc4j. It is kind of master detail, 2 different tables but I want to change the display of it into a single table. For each master record in a table, I want to display detail

  • Problem with JDBC CONNX (make Rollback)

    When we work with tables in BD since Oracle ADF through this JDBC ConnX operate correctly, except when done in a transaction rollback, which produces the following error performance: "Statement not active." To determinate where the error occurred, we

  • HtmlImporter is not working

    My version of TLF is 502 (715519). When i try to use HtmlImporter with folowing code: var importer:HtmlImporter = new HtmlImporter(this._mainTextFlow.configuration); var textFlow:TextFlow = importer.importToFlow(XML('<font color="#FF0000">hello world