How do I access the results of a multi dimensional array.

I created an array from a recordset using the following code copied from a post by David Powers
$results = array();
do {
  $results[] = $row_recordsetName;
} while ($row_recordsetName = mysql_fetch_assoc($recordsetName));
My recordset has two fields in the $results array, index and name, and the array also seems to generateanother index called whichit uses to reference the rows- in this case, [0] to [2]
When printed using the print_r function, it shows results like the following:
Array[0] => Array([index]=>:2[name]=>Microsoft)
=> [1] => Array([index]=>:5[name]=>Facebook)  *
=> [2] => Array([index]=>:6[name]=>Adobe)
I have another recordset  called employers that has a pointer into the array which holds the same value as the Array[index].
In this recordset is a row with  a pointer value of 5, and I want to access and print out the Array[ name] whose value =  "Facebook"  from the example array element above*, where Array[index] = 5.
How would I do it?
To put it in simulatede SQL, how do I select  $results[name] from $results where $results[index] = $row_employerset[pointer]   and print it?

Looks like the Forum people at Adobe are experimenting with tags linked to posts.
Mouseover the tags and you can see how they're used in the URL querystring (the bit after the question mark) in the browser status bar.
Tags are a common tool in CMSes and forums to assist with filing and retrieving posts and related records. Check any Wordpress blog.
There is a dedicated Adobe forum for discussing the formatting of the forums
http://forums.adobe.com/community/general/forum_comments

Similar Messages

  • Access the results of the following query in Java? SELECT sum(COL_X) FROM TABLE_A

    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery(
    "SELECT sum(COL_X) FROM TABLE_A");
    int = rset.getInt("sum(NUM_CUSTOMER)");This is obviously wrong. Could someone please help me a little on the syntax? I just want to be able to get the sum of the numeric values in a column without having to loop through a ResultSet and manually adding up the total. My question is how can I access the results of this query by assigning the sum to a java variable?

    Hi,
    Probably the easiest way is to use an alias for the sum column, i.e.:
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery(
    "SELECT SUM(COL_X) MY_SUM FROM TABLE_A"
    int i = rset.getInt("MY_SUM");null

  • How to access the result list in teststand after execution using labwindows​/cvi

    I am developing a user interface in labwindows/cvi that runs multiple teststand sequence files and would like to combine their reports (generated in teststand) into a single file at the end of a UUT. What is the best way to do this? At the moment, I'm trying to access the result list local variable after the execution has ended using API calls from labwindows/cvi and an end-of-execution callback event but those run-time variables do not exist anymore. How do I get a hold of the result list array at the end of an execution? I would like to grab this variable and pass it along from sequence to sequence using labwindows/cvi and not teststand itself. Is this possible? Any help would be great.
    Thanks in advance,
    Luis

    Hey Luis,
    Check out the response to this thread at the NI TestStand board here!

  • URGENT: My iPad doesn't have an app store at all, there is no icon for it, and searching it on my iPad doesn't come up with any results. How can I access the app store?

    HELP! I don't know why my iPad doesn't have an app store, or maybe someone uninstalled it, but how do you access the app store? My iPad doesn't even have an app for it!

    restricted? as after my ios 8 update  I get this msg "can not access the app store" for my ipad 4

  • How do I access the web utility with model cisco sf302-08p ?

    Hi,i have a problem with the model Cisco SB SF302-08PP Switch , i connect a cable rj45 to my pc and configure the adapter local area connection (ip address:192.168.1.252), the LEDs blink green, and go to the address bar and get the IP by default, which according to the manual is 192.168.1.254 and the result is: page not found. Is there any way to change the web utility? How do I access the web utility?

    restore  the switch by holding more than 30 seconds and try accessing with ip 192.168.1.254. username and password is "cisco". before change your base ip to 192.168.1.2-253.try to ping and check the connectivity

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • How can I access the savestore.js contents if the command about:sessionrestore shows a blank box even for already succesfully used backups?

    -------------------------------------------------------------------------------------------------------------------------------------------
    How can I access the savestore.js contents if the command about:sessionrestore shows a blank box even for already succesfully used backups?
    Is there a recent known problem with the about:sessionrestore command or is there any other way understandable to Firefox 29.0.1 through which recover the information stored in the sessionstore.js files.
    It seems the command about:sessionrestore is not capable anymore to read the contents of the sessionstore.js file present in the user profile folder.
    The box where windows and tabs should be listed is empty.
    I tried to paste a few old sessionstore.js files in the user directory while the firefox.exe process was not active, then opened Firefox again and tried to launch the about:sessionrestore command without any result.
    I think the files are not corrupted because I used most of them in other occasions and I stored them in folders not connected to the common use of any process.
    Also, I already successfully used the about:sessionrestore command in Firefox 29.0.1 in a few other occasions.
    I did a "clean reinstall" of Firefox 29.0.1 and the box contained in the tab where about:sessionrestore is executed is still empty even if the files themselves contain such information as tabs location and html addresses.
    After this I recovered the profile data I had stored in another folder and this is what you can see attached to this question.
    ---------------------------------------------------------------------------------------------------------

    If I select the "show my windows and tabs from last time" option in the startup settings the contents of any savestore.js file i paste in the user profile folder are opened without any problem.
    still, the box in the tab loaded by the about:sessionrestore command is blank and empty, so it's not possible to "de-select" any window or tab. it's necessary to find an editor to modify session backup files which may contain "bad addresses".
    does such an editor already exists?

  • How can I access the properties of Microsoft files (excel, ppt, and word)

    Hi,
    How can I access the properties of common Microsoft file formats (Excel, Word, and Powerpoint) from a Java program. You can access/modify the properties of each document type using File->Properties in each MS application. The properties are essentially name/value pairs.
    Basically, I need to write a java program that scans a directory and accesses the properties in each of the MS files in the directory.
    thanks,
    -john

    By api. That is only way to establish a contract with the MS programs you want to interface with, unless you write an api yourself! I've used POI and it was an awesome way to use Excel in java. I created an excel spreadsheet from the results of a sql query from a batch program and then it was automatically emailed using javamail to my client. I had a lot of VBA experience with Excel, Word, and Outlook and it didn't take me long to get used to using Jakarta-POI.
    Now I see there is Jakarta-POI-HWPF which works with MS Word documents. Go to: http://jakarta.apache.org/poi/

  • How can I access the selected element of a DropDownByIndex-box?

    Hi,
    I want to create a WebDynpro with two web services. I created the first request with the first web service and the results are displayed in a DropDownByIndex-Box. Now the user should choose one of the results and I would like to use this for the request with my second web service. How can I access the selected Element of a DropDownByIndexBox in the Code?
    Thank you!!
    Julia

    Hi Julia,
    when user select one element in drop down it automatically set lead selection of node binded to dropdown.
    For example if you bind a dropdown to node myNode with value attribute myAttribute the lead selection of node myNode is set in the position of element choose from user.
    So to take this chooised element use this code:
    wdContext.currentMyNodeElement.getmyAttribute()
    bye
    Andrea

  • ONCE i made a photo project how do I access the original photos?

    once we make a photo project  how do I access the original photos?

    Do you mean to upload or use in another app or some such?
    There are many, many ways to access your files in iPhoto:   You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.  If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running:
    For users of 10.6 and later:  You can download a free Services component from MacOSXAutomation  which will give you access to the iPhoto Library from your Services Menu.
    Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5 Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    Show File:  a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.    3.b.
    b: On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected.

  • How can i display the result of java class in InputText ?

    Hi all,
    How can i get the result of java class to InputText Or OutputText ???
    also can every one in the forum give me road map for dealing with java in oracle adf because i'm beginner in oracle adf
    i saw some samples in oracle adf corner but it's difficult for me.

    User,
    Always mention your JDev version, technologies used and clear usecase description (read through this announcement : https://forums.oracle.com/forums/ann.jspa?annID=56)
    How can i get the result of java class to InputText Or OutputText ???Can you elaborate on your requirement? Do you mean the return value of a method in a class as output text? Or an attribute in your class (bean?) as text field?
    -Arun

  • How do I access the web-based utility

    I just purchased a wireless router...WRT300N. I want to access the "web-based utility" in order to update the firmware.
    How do I access the web-based utility...help!
    Thanks.

    Access the router’s web-based setup page.
    For instructions, click here.
    Linksys Easy Answer 4030, applies to WRT300N
    Upgrading the Linksys Router's Firmware
    Hope this helps,
    Lilla
    Westell 6100 modem/router; Linksys WRT54GL v1.1 router firmware 4.30.9; Linksys WPC54G v2 Notebook Card; CenturyTel DSL using PPPoE

  • I'm trying to set up Family Sharing. My settings show that the people I chose are there but I don't see any shared information. How do I access the shared info?

    I'm trying to set up Family Sharing. My settings show that the people I chose are there but I don't see any shared information. How do I access the shared info? All computers are using Yosemite 10.10.1 and are new 13" MacBook Pros.

    Hi wmcknigh,
    Welcome to Apple Support Communities.
    The article below should help you resolve the issue with shared content not appearing after setting up Family sharing on the MacBook Pros.
    If you don't see your family's shared content - Apple Support
    Cheers,
    -Jason

  • How I can displsy the results in a nice readable format

    I have this query in a cursor
    I is displaying the data like this
    Major/Minor RestrictionEnglish English and Theater Envir St-English
    How I can make it to display something like this
    Must be enrolled in one of the following Majors:
    English, English and Theater, Envir St-English
    looks easy but the descripton come from the union (cllumn    stvmAjr_desc)
         SELECT
         DISTINCT
           ssrrmaj_major_ind,
            DECODE (
                       ssrrmaj_major_ind,
                       'I', g$_nls.get ('BWCKSCH1-0088',
                               'SQL',
                               'Must be enrolled in one of the following Majors:' ,'<BR />'
                       'E', g$_nls.get ('BWCKSCH1-0089',
                               'SQL',
                               'May not be enrolled in one of the following Majors:','<BR />'
                          indicator1
                FROM ssrrmaj,
            scbcrse,
           ssbsect
          WHERE     scbcrse_subj_code = ssbsect_subj_code
          AND SCBCRSE_CRSE_NUMB = ssbsect_crse_numb
           AND ssrrmaj_crn = ssbsect_CRN
          --- AND ssrrmaj_majr_code = stvmajr_code
           AND ssrrmaj_term_code = ssbsect_term_code
           AND ssrrmaj_major_ind IS NOT NULL
           and SSRRMAJ_TERM_CODE = term  
           and ssbsect_subj_code = subj
           and ssbsect_crse_numb = crse_numb      
           UNION
           SELECT
           DISTINCT
             stvmajr_code,
           stvmAjr_desc
         FROM ssrrmaj,
            scbcrse,
           ssbsect,
          stvmajr
      WHERE     scbcrse_subj_code = ssbsect_subj_code
          AND SCBCRSE_CRSE_NUMB = ssbsect_crse_numb
           AND ssrrmaj_crn = ssbsect_CRN
           AND ssrrmaj_majr_code = stvmajr_code
           AND ssrrmaj_term_code = ssbsect_term_code
           and SSRRMAJ_TERM_CODE = term 
           and ssbsect_subj_code =  subj
           and ssbsect_crse_numb =crse_numb
           ORDER BY ssrrmaj_major_ind DESC;
      the second query display the data after the union
    like this
    1250 Earth and Oceanographic Sci
    1310 English and Theater
    1300 English
    1450 Envir St-English
    I guess I can deal with the dis play like
    this I only need the desc not the code
    Earth and Oceanographic Sci
      English and Theater
      English
    Envir St-English
    This is how I am displaying the results, the results are correct, I just need to diaplay the data in a more friendly format
    HTP.p ('<h4>Major/Minor Restriction</h4>');         
           FOR  ssrrmaj_major_REC IN  ssrrmaj_major_c (term_in,ssbsect_rec.ssbsect_subj_code,ssbsect_rec.ssbsect_crse_numb)
            LOOP
                IF  ssrrmaj_major_REC.ssrrmaj_major_ind IS NOT NULL
                THEN
                ----HTP.p ('<h4>Major/Minor Restriction</h4>');
                 twbkfrmt.p_printtext (ssrrmaj_major_REC.indicator1);  HTP.p ('<BR />') ;
                  ELSE
                  HTP.p ('<h4>Major/Minor Restriction N/A</h4>');
                  END IF;
                END LOOP ;   

    Just a thought...I suggest to use XSLT for doing these type of formatting. Its more flexible to get XML for te query columns and then define the formatting at XSLT level. This way you dont have to keep changing the procedure or query. Just XSL change will do the job..

  • How can I access the Home Sharing Library from my iPad?

    We have an ipad 2 with ios 7, and an imac with itunes 11.1.3
    Just heard about home sharing and want to use this - surprised we haven't heard of it before
    home sharing is turned on in itunes (file > home sharing).
    home sharing is on for the ipad (settings > music)
    They are both connected to the same wifi network (usually our computer doesnt use wifi and is wired, but we turned wifi on just for this)
    When I open music in the ipad (even after continually quitting and reopening the app) there is no 'more' button in the bottom right that there is supposed to be.
    What is wrong? How do I access the library from the ipad? Help please!

    Welcome to the Apple community.
    More does more than home sharing, so it's odd that it isn't there, even if home sharing wasn't working for some reason. Are you sure you are in the music app and not the iTunes App.

Maybe you are looking for

  • Performance tuning of query

    SELECT * FROM FROM contracts a WHERE a.start_date > TO_DATE ('12/01/2009', 'mm/dd/yyyy') AND a.contracts_type IN ('C1','C2','C3','C4','C5','C6','C7','C8','C9','C10') explain plan gives the below details Cost: 1,351,083 Bytes: 49,313,352 Cardinality:

  • OSX RDP v8.0.24308 Default Resolution/No Fullscreen for new connections

    I would like to set defaults so that any new connection I create always are set to No Fullscreen, a specific Resolution, and a specif Color-Depth.  I should not have to change this for all new connections.

  • Login servlet checks db for ID/PWD

    Upon compilation receive the following: Login.java [31:1] unreported exception java.sql.SQLException; must be caught or declared to be thrown String uName = validateUser(userId, password); ^ 1 error This occurs with the following code (which does thr

  • Easy Setups and settings not visible

    I've created a few different easy setups and other settings for various situations as I've been working but for some reason none of the settings I've saved are accessible after I close the program. I've tried clicking the "show all" checkbox on the E

  • How do I sync my contacts from my iPhone to my Mac using iTunes 11?

    How do I sync my contacts from my iPhone to my Mac using iTunes 11?