How to navigate through a recordset using PHP

I have a recordset containing a MySql table with 5 columns, each containing an email address of a staff member in a club.

Each line represents a different club and each column a different type of agent.

The first column represents presidents, treasurers next etc...

The recordset is called $mailset.

I need to loop through each row in $mailset and extract the email addresses of each column and concatenate them into a string separated by semicolons semi so it ends like this:

[email protected] ; [email protected] ; [email protected] ; and so on.

This is how the recordset is implemented:

@mysql_select_db ($database_dummyread, $dummyread);

$query_mailset = "SELECT club_chair_email, club_treas_email, club_sec_email, club_delegate_email, club_deputy_email FROM clubs;

$mailset = mysql_query ($query_mailset, $dummyread) or die (mysql_error ());

$row_mailset = mysql_fetch_assoc ($mailset);

$totalRows_mailset = mysql_num_rows ($mailset);

? >

I tried to use a loop to iterate through the Recordset, but it always shows the first record, so its not to move the pointer in the file.

The pseudo code of the punishment to be something like this:

Initialize variables and move to the first record

If the registration process

Read a record

Treat all columns

Move to the next record

on the other

If there is no record

print an error message

on the other

Print the results.

Can someone give me a hint on how to move from one line to the other in a recordeset under the control of a loop.

I use PHP and MySql. (as far as I know, this is the original - not AOP or MySqli)



While ($mail = {mysql_fetch_assoc ($mail_seyt))}

extract ($mail);

echo "$club_chair_email - $club_treas_email".
";

}

That should put you on the right track.

Tags: Dreamweaver

Similar Questions

  • How to navigate through the file to the blackberry playbook using Tablet blackberry OS for Adobe Air SDK

    Hi all

    How to navigate through the file to the blackberry playbook using Tablet blackberry OS for Adobe Air SDK.

    And also I want to download this file on the server.

    Help me by providing examples of coding.

    Thanks in advance.

    With respect,

    Sébille C

    Here are some tips to help you get started.  It all depends on the terms that you use for your search.  For the first, I would use "adobe air browse file."  For the second, I start with only a variation as "adobe air download file" and then adjust according to the first results.

  • How to navigate through records

    Hi all

    can someone help me how to navigate through folders using scripts?

    I want to compress a folder into a zip file using scripts.

    Thank you

    Legs, this will a list of all the files in each folder and subfolders...

    var folders =[];
    var topLevel = Folder.selectDialog("Please select top level folder");
    //get a list of all sub folders
    folders = FindAllFolders(topLevel, folders);
    folders.unshift(topLevel);
    for(var a in folders){
        //get a list of all files in each folder in turn
        var folderList = folders[a].getFiles();
        //do whatever to each file list
        }
    function FindAllFolders( srcFolderStr, destArray) {
     var fileFolderArray = Folder( srcFolderStr ).getFiles();
     for ( var i = 0; i < fileFolderArray.length; i++ ) {
      var fileFoldObj = fileFolderArray[i];
      if ( fileFoldObj instanceof File ) {
      } else {
             destArray.push( Folder(fileFoldObj) );
      FindAllFolders( fileFoldObj.toString(), destArray );
      }
     }
     return destArray;
    }
    

    To get all the files in a folder, it would be...

    var topLevel = Folder.selectDialog("Please select top level folder");
    topLevel.getFiles();
    
  • ls.exe system error - how to navigate through the directories

    I get the following error when you try to use ls or ls-l to navigate through the directories/folders on windows command prompt.  "ls.exe system error, the program cannot start because cygintl - 2.dll is missing on your computer. Try reinstalling the program to fix this problem. »

    I wish I could use ls and cd to browse the directories.

    Does anyone have any ideas?  Is there something I need to do to win these functions? Where can I download this program and how to install?

    Ok. I think I maybe just but by own question.  I tried to install SSH.  I installed "OpenSSH 4.2p1 - 1 for Windows" athttp://sshwindows.webheat.co.uk/#top .  Now, when I type ls , the command prompt lists my directories. OpenSSH 4.2p1 - 1 includes ' cygintl - 2.dll and cygintl - 3.dll as required by some exe such as ls.exe.»

  • How to navigate through the plans of work on my device?

    I would spend my plans to work on my device. How?

    You can drag to navigate and get an overview of the different work plans. Allows preview CC that slide you through work plans based on the width. For example, if you have a PSD that has plans to work for iOS of various sizes, and you connect an iPhone 5, overview CC will automatically display the work plan first iPhone 5. You can also select a specific work plan in the Nav app menu and navigate through work plans that correspond to the width of the selected one.

  • How to navigate through an XML document?

    I try to use an XML document to describe conditional text ID can be assigned to a section of text. For this I need to read the child nodes for a given node in the XML file and assign values to these children node in a table.

    API document DW8 does not seem to support JavaScript DOM XML functions such as loadXMLDoc(), or as dom.getSelectedNode () functions supported by xpath expressions. The childNodes object is only the immediate children of the document object and does not correctly as xmlDOM.getElementsByTagName("TopicSku").childNodes.

    How to browse a document XML using the API extension DW8?

    Thank you

    -Scott

    Oh, wait. I was not using getElementsByTagName("TopicSku").childNodes. It works with xmlDOM.getElementsByTagName ("TopicSku") [iter] Sublst.ChildNodes(1).ChildNodes(0). I'm back on the rails.
    -Scott

  • Urgent: How to navigate through records using the ReadOnly ADF form

    Hi guru,.

    I'm new to ADF.
    I have a requirement where I need to display the records 'ADF read only form' where my query retrieve multiple records, now I want to browse all the record as we do in the table of the ADF. How can I achieve this using the Readonly ADF form.

    Please suggest me emergency.

    Thank you
    SPC

    You can also drag and drop on Next, Previous, first, last from the data control panel like buttons (it comes under the node for the data collection operations),
    A lot of this is covered in the book that I wrote to help people to start learning oracle ADF and Jdeveloper

    http://www.mhprofessional.com/product.php?ISBN=0071744282

  • Q. how get several results from a single column in a recordset using PHP

    Hello world

    I hope someone can help. I have a column called categories and about 5 categories listed. I want to show all the products listed in say 2 categories. I don't have that basic php skills so know only how to pass a value to the url to display the products of 1 category for example

    Select *.

    PRODUCT

    Category WHERE colname =

    $colname = $_GET ['category'];

    URL... page.php? category = result

    Question is how can I get products in several categories to show for instance all the products of the categories "fruits", "dairy products", 'meat '.

    Your help will be much appreciated, because I'm tired of beating my head against the wall. (should invent a pillow of wall PHP and sell online)

    Thank you

    $colname1 = $_GET ["category1"];

    $colname2 = $_GET ["Category2"];

    $colname3 = $_GET ["category3"];

    Select *.

    PRODUCT

    Category WHERE the ('$colname1', '$colname2', '$colname3')

    > Your help will be very appreciated because I'm tired of beating my head against the wall

    My guess is that you are trying to build a web application without first learning the basics of PHP and SQL. It is certainly the hard way.

  • How to navigate through Layer Comps on my device?

    I navigate my compositions of layers on my device. How?

    CC shows print preview the layout of the active layer in Photoshop. Use the layer Comp panel in Photoshop to select which layer comp to see a preview.

  • How to navigate through folders

    I want to add mp3 music files and navigate threw files.

    I add folders from my computer to the music section

    I don't see how I caqn navigate threw files, I can make my computer

    jivangilad wrote:

    I click on folders, then I can choose:

    internal memory / external memory

    I choose internal memory then PSG then music, and then only I see the folders that I have in the drive.

    Yes. This is how it works. What do you expect?

  • How to navigate through all of the links in the links Panel in the user interface?

    Hello world

    I wonder how I can browse all the links in the links Panel, programmatically. I have a document where the resources present in this Panel are not available using the ILinkManager. He tells me there are no links in the document when using ILinkManager-> GetLinkCount().

    These resources are not more related to any element on the page. These are images which are not more related to what it is. Right-click on it and click on 'join the link' shows nothing in the document (the same operation on a resource that is linked to a graphic image focuses on it). I can manually re-edit the link, but nothing more.

    In the user interface, there is no way to delete (not menu 'remove' or whatever).

    I think I "created" them as follows: during the creation of the story, the story is tagged. Then I attach a picture frame and label it in the history. Then I remove the frame (s) containing the history, so that its history xml is "not placed" (see kXMLUnplaceCmdBoss). At this time (if I'm not mistaken), I created these inaccessible resources. I see the xml story unplaced in the structure of the document that remains not placed XML (in the backup store) and resources in the links Panel.

    History unplaced XML CAN be removed manually, but not these inaccessible resources. However, there must be a way, as InDesign can display them.

    How to reach these 'lost' resources and delete them, by programming?

    Independent of your real problem, I would first try the equivalent in the user interface.

    Preparation:

    To simplify things and make them visible, working on a traditional tale - not the backup store.

    The story should be labeled and will remain so.

    Add content as complicated as you want.

    Some content preceding and behind it must survive.

    Your content must be labeled - surrounded by a single label.

    Text-Select this unique tag (see the invisible etc for the right selection).

    Remove the text selection.

    See: Tags are gone, content text disappeared, the images have disappeared.

    Now find a way to perform this deletion text programmatically. Without specific code XML - operation but a simple text, InDesign will do the rest.

    Finally, use the code that results on the backup store.

  • How to navigate through the CSV file by row and pass it by MFL

    I have a CSV file that got no. n. records with the new line ("N") that separates each record of the

    Each record is of about 10 fields or more delimited by ' |'

    for example.

    11111. "20090316152" | " » 0"| » 0"| » 0"| » 0"| » 0"| "1-7DT-439" | " » "||" N ".

    22222 | "20090216152" | " » 1"| » 0"| » 0"| » 0"| » 0"| "1-7DDI-439" | " » "||" N ".

    33333 | "20090316352" | " » 6"| » 0"| » 0"| » 0"| » 0"| "1-5KK-439" | " » "||" N ".

    The requirement is to read the file using OSB - file adapter and move all records to the MFL for the conversion of XML

    Thank you
    Danny

    What happens when you pass all $body as it is the transformation of MFL?

  • How to navigate on integration FM messages

    Several times I see questions that have been asked before.
    and who have already posted for them useful information.

    The default format of this blog does not show a single page, when in fact there are many others.

    It was not obvious to me how to navigate through all the posts.
    Perhaps others might use this trick, too.

    Please read the post of Vivek below.

    In addition, in your link 'Profile' at the top, click on 'Personal Options' and you can set messages/topics how you want to display per page and view the limit in terms of number of days.

  • How to configure a form using PHP?

    I am creating a form in Dreamweaver using PHP, because my server requires it, but I don't know how to do it. I used before Formmailer easily in Dreamweaver, but it apparently requires some sort of coding & I am naïve. Can someone guide me through this?

    You can reuse Formail

    Did you get this script to treatment of your hosting provider?

  • Using arrow keys to navigate through the presentation

    Hi all

    I converted a powerpoint presentation using adobe captivate and uploaded to LMS. My question is how can I use the arrow keys on my keyboard to navigate through the presentation.

    Thank you in advance.

    Hello Yanno,

    You can try to associate the arrow key as shortcut for the click box that would appear on the slide if you imported the TPP with the slider forward as a click of the mouse.

    Thank you

    Vish

Maybe you are looking for

  • change in the apple store for different countries

    Hello I use a paid Indians account from now on. but when I changed the land of the apple store in Australia, he asks a credit card. so, how can I create a free who represent the same apple ID

  • Order recovery media for HP Probook 4540 s

    Hard drive failed shortly after the warranty ended and cannot find the recovery media for the laptop. Windows 7 Pro 64-bit Product C9K70UT number

  • Wireless network breaks down Internet when transferring over network

    I about gave up on that, but maybe someone can help. I have Windows 7, my wife's computer has Windows Vista There are also other computers on the network in the back using 7 and XP I think, but they are not involved in this problem directly. My wife

  • Citing the addressbook

    Hello I would like to invoke an application of address book for a contact in "view" mode, as well as a mode of display (net.rim.blackberry.api.invoke.CalendarArguments.ARG_VIEW) that is available for the call for a calendar app. Only two modes availa

  • C++ NTVDM CPU error

    Recently, I started to learn C++ and made some simple programs in Microsoft Visual C++ 2010 Express. However, when I started programming a video game, I noticed the limit of 300 line and had a little trouble trying to include several source files, so