How to group the returned records

My current Recordset returns the following:

Africa

Egypt

Africa

Namibia

Africa

Morocco

Central America

Mexico

The North America

United States

The North America

Canada

How to group set of records according to the regions? It returns the following (taken from a book exercise):

Africa

Egypt

Namibia

Morocco

Central America

Mexico

The North America

United States

Canada

MySQL select statement:

@mysql_select_db ($database_conn_newland, $conn_newland);
$query_rs_countriesbyregion = 'SELECT countryID, region, countryName, regionID, regionName FROM tbl_country, tbl_region WHERE tbl_country.region = tbl_region.regionID ORDER BY regionName ASC';
$rs_countriesbyregion = mysql_query ($query_rs_countriesbyregion, $conn_newland) or die (mysql_error ());
$row_rs_countriesbyregion = mysql_fetch_assoc ($rs_countriesbyregion);
$totalRows_rs_countriesbyregion = mysql_num_rows ($rs_countriesbyregion); @mysql_select_db ($database_conn_newland, $conn_newland);

My table code:

< body >
the strong group > < h2 > < by region: facilities > < / h2 >
< table width = "30%" border = "0" cellspacing = "0" cellpadding = "3" >
<? PHP {? >}
< b >
< scope = "col" td > < strong > <? PHP echo $row_rs_countriesbyregion ['regionName'];? > < / strong > < table >
< /tr >
< b >
< td > <? PHP echo $row_rs_countriesbyregion ["countryName"];? > < table >
< /tr >
<? PHP} while ($row_rs_countriesbyregion = mysql_fetch_assoc ($rs_countriesbyregion));? >
< /table >

Please help or direct me to a web resource.

I would do something like this:


 
          
         


           
         
           


     
   
   
   

Moreover, Mexicans don't consider themselves not part of Central America!

Ed

Tags: Dreamweaver

Similar Questions

  • How to list the active recording points in a session?

    How to list the active recording points in a session?

    Brands of Marcelo - ESRI wrote:
    How to list the active recording points in a session?

    not easily

    http://www.orafaq.com/Forum/t/122719/2/

  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • How to get the different records for the date max.

    Hi all

    Here is the sample sql for sample table and data.

    Create table student (dept_id number(10), first_name varchar2(10),last_name varchar2(10),join_date date,years_attended number(10));

    insert into student values (1,'Ann','Coleman',to_date('3/7/1917','MM/DD/YYYY'),4);
    insert into student values (1,'Ann','Coleman',to_date('3/7/1916','MM/DD/YYYY'),5);
    insert into student values (2,'Rock','Star',to_date('1/1/1920','MM/DD/YYYY'),5);
    insert into student values (2,'Rock','Star',to_date('1/1/1921','MM/DD/YYYY'),6);
    insert into student values (3,'Jack','Smith',to_date('7/1/1900','MM/DD/YYYY'),3);

    insert into student values (3,'Jack','Smith',to_date('7/1/1901','MM/DD/YYYY'),4);

    commit;

    I need to get maximum date records when the name and dep_id corresponds to. I wrote the query below and it becomes the expected result, but I'm not sure it's quite effective.

    SELECT s.dept_id, s.first_name,s.years_attended

    FROM (SELECT dept, MAX (join_date) join_date

    STUDENT GROUP BY dept_id) x

    Student JOIN s ON x.dept_id = s.dept_id AND x.join_date = s.join_date;

    This above query returns records like below, and this is the goal.

    DEPT_ID NAME YEARS_ATTENDED

    1                         Ann                                4

    2                         Rock                              6

    3                         Jack                              4

    Can you please let me know the query SQL I wrote is effective or not? This sample table may have less data, but I'm dealing with millions of records.

    Hello

    Thanks for posting CREATE TABLE and INSERT statement. This really helps.

    Here's a solution. I also added a name that seems logical. In which case you can delete:

    Select dept_id, first_name, last_name

    , max (years_attended) Dungeon years_attended (last dense_rank order by join_date)

    the student

    Group of dept_id, first_name, last_name;

    DEPT_ID FIRST_NAME LAST_NAME YEARS_ATTENDED

    ---------- ---------- ---------- --------------

    1 Ann Coleman 4

    Rock 2 star 6

    3 Jack Smith 4

    Kind regards.

    Alberto

  • Content of the text - how to insert the return code in the textfield?

    Hello
    I'm working on form textfield that allow the user to insert text and save it in the SQL database as the data type long text. User can retrieve the saved text and display in the web page as an article.

    The problem I'm facing right now is the article containing the RETURN/ENTER or new paragraph. When I ask article he become one paragraph, if I understand correctly there is a code that I have to insert when user types returrn/enter button until I have record in the SQL database.

    Anyone who knows what I need to add the code and how do I do to auto detect when the user hit the return/enter key as a textfield.

    Thank you
    Eric

    Thank you Daverms and Azadi for the entries.

    I chose the Daverms method for the input and stored in the database and the display to aid REReplace() of Azadi.

    Thank you guys.

  • How to get the current record in a block?

    Hello

    How can I get the registration of a block, but the current record of the records displayed by this block? (for example if the number of records is 50, but the number of displayed records is 10, I want to get the current_record from the 10, not all 50).
    the: system.current_record returns the current all-time record

    Thank you

    You can use a combination of: SYSTEM. CURSOR_RECORD which returns the current record and GET_BLOCK_PROPERTY ('BLOCK', TOP_RECORD), which returns the number of the record that is displayed as the first visible record, your result should be something like

    :SYSTEM.CURSOR_RECORD-GET_BLOCK_PROPERTY('BLOCK', TOP_RECORD)+1;
    
  • How to get the return parameter in sequence teststand ran by labview labview

    Hello

    Executes a test sequence of labview (essentially running "\Examples\TestStand API\Executing sequences using API\LabVIEW\Execute with no Model.vi process") I need to get a parameter returned in 'Settings', after the sequence has run.

    My problem is that I get the value upon registration of the sequence and not the value after execution.

    How?

    Vagn

    Vagn,

    in order to obtain the values of the execution, you need access to execution. The following screenshot shows how to access.

    Please note that this VI is lying will be called by TestStand. DO NOT USE THIS VI IN A CUSTOM USER INTERFACE!

    Thank you

    Norbert

    EDIT: This dummy code shows how to read the string parameter 'Return '. Each parameter must be read separately with appropriate playback function.

  • How to set the return on investment

    I installed 'just' mink toolkit in LV2011 to get the digits on LCD display information.

    As a starting point, I opened "Example LCD" and change.

    However, KING seems to be an important concept in the vision.

    KING should be measured from the top-fall position?

    However, can you tell me how I can check KING in the picture.

    Included is the example of the superposition of the KING on the ougghta.

    I wanted to put the part or the entire region as the return on initial investment then attempted to verify if the 'get LCD ROI.vi' works correctly.

    but he could not view the return on initial investment on the image.

    How can I fill the KING descriptor to define a region on the image?

    Image: example of poor quality - 640 * 480 jpg

    labmaster.

    Question *) additional: using a code example, I found return on initial investment must be properly defined to identify the numbers.

    Can you tell me the following...?

    (1) rule to define the ROI on an image for good recognition of numbers. (for example, numbers only area...)

    (2) can I do the code to find the original KING (connected to the well of recognition) automatically?

    Changed the idea of rock.

    Don't try with 7digit LED functions... Can be applied to a very limited image.

  • How to limit the audio recording time?

    Hello

    I want to limit the audio recording time 60 seconds. How can this be achieved? I've seen a single method but its to set the size. Or is it possible to get new coding time during recording? Please help me!

    When you start recording start timer once it reaches 60secs... stop recording.

  • FDMEE 11.1.2.4 - how to load the same record source of 2 different custom in HFM members

    Hi Experts,

    We have the following situation:

    We need download a source document unique member 2 custom end balance as well as two rollforward Member custom movement 2 (additions, for example), the SAME account.

    In our GL, we have separate accounts for the additions, disposals, depreciation, etc.   In HFM, we use custom for these last members.

    I tried the multi-dimensions mappoing member card custom 2 individual based on the story.   It works fine, but when I add another condition by using the same account of source and card balance end Member, he only ended up filling a 2 custom members (according to what has been covered last importing).

    What would be the best way to load a single 2 custom members (same account) source document?

    I wanted to use the accounts of logic since I know that would work, but our financial team do not accept this approach.

    It is even possible to load the same record of 2 different HFM Member?  Even if we loaded the file even a second time in another place, I think that it still would replace what took the first time, instead of loading again to another custom on the same member account.  Even if we loaded to HFM on 'merge '?

    Any ideas at all would be appreciated.

    Thank you
    Mark Smith

    Why your financial team will not accept the approach of the accounts of the logic? He is the obvious solution to your problem. FDM or FDMEE, you can only load on the data at the intersection of a target element. If you want to load the same piece of data at several intersections in the target, then you need to have this piece of data repeated in data sources n then you will need something in the source that could identify how unique each copy so you can map correctly. As noted it is one of the main functions of the accounts of the logic, other approaches are likely to be messy, more prone to error and much harder to verify.

  • help how to ignore the header record in the input file

    Hi gurus,

    Kindly help here.

    I'll have to generate the output to CSV file by getting data from the file 'INFILE.csv', a record header in it.

    I would like to know to go to the header record during playback using utl_file.get_line package.please suggest.

    examples of data 'INFILE.csv ':

    NUMBER: the header
    318000000000
    318000000121
    2005002999
    3187209699

    script:


    DECLARE
    fINFILE UTL_FILE. TYPE_DE_FICHIER;
    fOUTFILE1 UTL_FILE. TYPE_DE_FICHIER;

    vINFILE_PATH VARCHAR2 (200): = NULL;
    vOUTFILE_PATH VARCHAR2 (200): = NULL;

    vINFILE_NAME VARCHAR2 (100): = "INFILE.csv";
    vOUTFILE_NAME1 VARCHAR2 (100): = "OUTFILE.csv";

    vGLOBAL_NAME VARCHAR2 (100): = NULL;
    vINPUT_REC VARCHAR2 (1000): = NULL;

    nNEW_NUMBER NUMBER (16): = NULL;
    nMERCH_ID NUMBER (8): = NULL;

    BEGIN
    vINFILE_PATH: = ' / home/RPT / ";
    vOUTFILE_PATH: = ' / home/RPT / ";

    BEGIN

    fOUTFILE1: = UTL_FILE.fopen (vOUTFILE_PATH, vOUTFILE_NAME1, 'W');
    EXCEPTION
    WHILE OTHERS THEN
    UTL_FILE. FCLOSE_ALL;
    RETURN;
    END;

    BEGIN
    fINFILE: = UTL_FILE. FOPEN (vINFILE_PATH, vINFILE_NAME, "R");
    EXCEPTION
    WHILE OTHERS THEN
    UTL_FILE. FCLOSE_ALL;
    RETURN;
    END;

    BEGIN
    LOOP

    nNEW_NUMBER: = NULL;

    UTL_FILE. GET_LINE (fINFILE, vINPUT_REC);

    BEGIN
    SELECT MERCH_ID
    IN nMERCH_ID
    PROD. MERCH
    WHERE NEW_NUMBER = LPAD (nNEW_NUMBER, 12, 0);

    -Creation of the output file for
    BEGIN
    UTL_FILE. Put_line (fOUTFILE1,
    LPAD (nMERCH_ID, 8, 0)
    );

    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' error when writing to the outfile1: ' |) SUBSTR (SQLERRM, 1, 250));
    END;

    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' error finding MID for merchant - ' | nNEW_NUMBER |) » '|| SUBSTR (SQLERRM, 1, 250));

    END;
    END LOOP;

    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    dbms_output.put_line ('finished - End of file');
    WHILE OTHERS THEN
    dbms_output.put_line (' error reading I / p file ');
    END;

    IF UTL_FILE.IS_OPEN (fOUTFILE1) THEN
    UTL_FILE. FCLOSE (fOUTFILE1);
    END IF;

    IF UTL_FILE.IS_OPEN (fINFILE) THEN
    UTL_FILE. FCLOSE (fINFILE);
    END IF;

    END;
    /

    Hello

    978485 wrote:

    Thanks Frank.

    where should I call the get_line., in my script, I started after the loop as above

    Immediately after open from finifile is a good place:

    ...

    fINFILE: = UTL_FILE. FOPEN (vINFILE_PATH, vINFILE_NAME, 'R');

    -The first line always is a header, to be ignored

    UTL_FILE. GET_LINE (fINFILE, vINPUT_REC);

    ...

    Or you could do later as immediately before the LOOP.

  • How to set the return value of the method to the /outputText inputText field

    Hello

    How to set output return value method of a /outputText adf inputText field

    Concerning

    sevanan

    Well put method's return value to a managed bean variable.

    Create a variable in the bean and set the return value to this variable.

    the inputText and outputTextValue to this managedBean.variable value

    That's all...

    and add partial trigger for inputText programmaticly

  • How to interpret the return value of $. colorPicker()

    Hello

    I have a questiion how to interpret the value returned by this function:

    $. colorPicker()

    It returns a number of strange how convert as usable values RGB.

    Any help would be appeciated.

    This should help:

    function hexToColor (theHex) {}

    var r = theHex > 16;

    var g = (theHex & 0x00ff00) > 8;

    var b = theHex & 0xff;

    return [r/255, g/255, b/255,1];

    }

    hexColor var = $. colorPicker();

    var newColor = hexToColor (hexColor);

    Dan

  • How to change the return service for the configuration of pair of Eve Active

    I created the pair of Eve Active (no Clusterware) with service return TWOSAFE RETURNS the value.
    create active standby pair
     dbactive on "server1",
     dbstandby on "server2"
      return twosafe ;
    How can I change of RETURN TWOSAFE changed to RETURN RECEIPT?

    Thanks in advance for the help.

    Kind regards
    Gary

    You must configure the return Service to manage failures of network/timeouts. See 'Establishment' will return failure political failure/recovery service here (http://docs.oracle.com/cd/E21901_01/doc/timesten.1122/e21635/design.htm#TTREP342)

    The Return Service clause allows you to set up when the transaction must be validated locally where the replication agent does not receive any acknowledgment of the intelligence officer.

    -DISABLE the RETURN sets the number of timeouts before it stops waiting for the Subscriber to answer.
    -You can set attribute SUSTAINABLE COMMIT to commit the transaction with Commit sustainable is set on the current database, after RETURN of SERVICE is disabled.

    At the application level, you can also control what you want to do if there is a timeout, you can set the LOCAL ACTION of COMMETTRE to VALIDATE or NO ACTION. If you want the agent of rep to commit the transaction locally, it is transparent to the application code. If you set NO ACTION, the application
    may decide whether to re - issue the call validation or roll back the transaction.

    The link to the above documentation has more details.

    Susan

  • [JS CS4/CS5/CS5.5] How to get the return value from Javascript using doScript

    Hi all

    I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.

    What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?

    Thanks in advance.

    Rachiud

    doScript() evaluates an expression, so just make sure that your Javascript is an expression.

    For instance "(3 + 3)" 6 "

Maybe you are looking for

  • Update Firefox 35 disabled plugin Free Download Manager 1.6.0.8

    It is a must for me. All options other than the use of IE?

  • Lenovo G710 - graphics drivers

    Hello I can't find the right graphics drivers for my laptop Lenovo G710... To the Lenovo support site, when I detect my product for driver downloads, it doesn't let me choose win10, when I have to choose my operating system. I'll also post a photo he

  • superfluous confirm popup in the user interface editor?

    Hello NO,. I have a XY Chart with several annotations. If I open the uir file and double click on the chart (-> popup Graph Edit), click the 'Annotations' button (-> popup edit Annotations) and change current Annotation say from 24 to 23 (see propert

  • A1 - 830 USB loading too weak to support its use?

    My Tablet goes dead when I play games while it is connected to my laptop to charge via usb, because apparently it is not getting enough energy to spare. When the Tablet is attached to the tht of transformator usb is plugged into a 220 outlet it seems

  • I can't do a system restore! Help please!

    Whenever I have attampt to perform a restore of the system, the execution fails and a message reading: An exception occurred trying to launch ' C:\Windows\system32\shell32.dll,control_RunDLL «C:\Windows\system32\systemdm.cpl,"System"» Is someone can