Recordset and repeat regions

Hello world. Is it possible to apply several regions repeated to a Recordset? I use a recordset to search results in a database. I need to return the results in two different places on the same page. A place back the 'name' and 'occupation' and other give details and a photo of the individual. The results contains many records, so I need to apply a repeating region. However, I can only apply a region repeated to a Recordset. I am new to Dreamweaver and would appreciate any assistance. Thank you

Hello

You can read this article by David Powers?

How to reuse a PHP recordset in more of a repeat region? (http://kb2.adobe.com/community/publishing/528/cpsid_52877.html)

Tags: Dreamweaver

Similar Questions

  • Region total and repeat

    Can Hi anyone help

    I use PHP with a mySQL database. One of my pages display results from the database in a table with the repeat on the subject region. Is it possible for a total amount of fields on the page. for example 1 25 field
    2 30 area
    domain 3 5
    total 60
    Thank you inadvance

    MT006 wrote:
    > I use PHP with a mySQL database. One of my pages to display the results of
    > the database in a table with the repeat on the subject region. Is there a way for a total of
    > fields on the page.

    Yes, it is pretty easy. Create a variable to hold the total and add the
    value of each field. Let's say your repeat region to looks like this:



    Amount


    Change it like this:




    Amount

    $total += $row_recordsetName ["amount"];? >



    Total

    --
    David powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • Repeat regions inside the repeat regions

    I don't know how to do this.  Dreamweaver has said that we can not put server inside server behaviors behaviors.   But it seems like a pretty standard thing, someone might want to do.  For example:

    Suppose you want to create a menu online.  And say... you have two tables:

    Elements of array

    • item_id
    • Nom_element
    • item_description
    • item_price

    Ingredients of the table

    • ing_id
    • ing_name
    • item_id

    So, on your page, you want to display a repeat of each menu item region in the database.  In addition, within each menu item, you want to have a repeat region of each ingredient that has the same id of the element.

    Who is?  So, it can look like:

    Fishy lips
    Wonderful lips for all you lovers of the shady lip!  Get 'em today!

    Ingredients

    Fishy lips

    Seasoning ladle

    Herbs fish

    Fishy spices

    Luckity Hoppity
    Legs of amazing rabbit that bring good luck!

    Ingredients

    Rabbit legs

    Spices of rabbit

    Language of cow

    Sorry, I'm not a php programmer, but I can explain the concept.

    First of all, your idea to recover the two recordsets and then display the corresponding data in the inner loop should work. But it looks like you get the wrong records.  If I understand, you obtain a list of healthcare providers and then education for each display. Fix? If so, then the caregiver is the outer loop, and education is the inner loop, yet your inner loop made progress helping RS:mysql_fetch_assoc($getCaregiver)

    You could try just those switching.

    However, it is more common first retrieve the recordset of the outer loop. Then, when you browse, you need to run an internal recordset for each iteration of the outside. Your SQL for the internal RS has a filter so that it contains only the matching records.

  • Adding images to the repeat region

    Hey guys, I recently started using the features of dreamweaver PHP with MySQL and I have my display of table data in a repeat region. I downloaded images to the database, but if I drag 'image' of the Recordset into the repeat region I just get a lot of binary. I read I should maybe use image URL rather than the traction of the database of images, but I don't understand how to get the images in sequence. How do I know what order to display if they are not in the recordset in PHP?  I wonder if I missed some feature of DW, as I suppose it is quite a common thing to want images in a repeat region. Any advice would be great. Thank you

    > I read maybe I should use the URL of the image

    > rather than pulling images from the database

    Fix. Storage of binary files in the database leads to performance problems.

    > but I do not understand how to get the images in sequence. How would

    > PHP know what order to display if they are not in the Recordset?

    The images are stored in the file system. The path to the image is stored in the database. The fields in the recordset with the path of the image - in order to generate the html code that displays the image in the Recordset loop.

  • getElementById() JavaScript does not work with the repeat regions

    I have tries an onmouseover and onmouseout to exchange all divs that recur in a repeating region of php and javascript doesn't seem to work for the first rehearsal of div. Is it because the repeat region creates a lot of identical divs and javascript code is confused?

    The following is a very simple version of my code setup which explains my problem:

    I create a forum where the individual comments are included in their own div ("commentDisplay"). To do this, I created a div and create a repeating region around it so that php will debit all the comments of each of them to give a copy of this div.

    for example:

    <? PHP {? >}

    < div class = "commentDisplay" >

    <? PHP echo $row_whateverRS ['whatever'];? >

    < / div >

    <? } while...? >

    Now, I wanted to create a simple javascript when the user moved their mouse on the station he would hide this div and display another div that holds the same content, but still had a background of different color and, most important, gave the user a chance to respond to the post (similar to the youtube comments section). So I created the following:

    < script... >

    function hideDiv (id) {}

    document.getElementById (id).style.display = 'none '; }

    function revealDiv (id) {}

    document.getElementById (id).style.display = 'block '; }

    < /script >

    and then I created this another div ("commentSwap"), which held the same information, but with a different background and an opportunity to respond (and with display: no) and insert the javascript code:

    <? PHP {? >}

    < div class = 'commentDisplay' onmouseover = "hideDiv ('commentDisplay'); revealDiv ('commentSwap')"onmouseout ="revealDiv ('commentDisplay'); hideDiv ('commentSwap') ">"

    <? PHP echo $row_whateverRS {'some']:?} >

    < / div >

    < div class = "commentSwap" >

    ... same-except the ability to answer

    < / div >

    <? PHP} while...? >

    the problem is that the code seems to work for the first rehearsal of the div and not the rest. In addition, when I move my mouse over the other div it causes the first div share.

    Why is this? Is it because all the Extensible divs (through the repeating region) all have the same name and confuse the javascript?

    Thank you

    YWSW

    YWSW wrote:

    So what do you suggest what to do instead (to produce the same see the div / hide div div result in a repeat region?)

    As shown by the fact that you can not have more than one ID on a page, my suggestion is to create the unique id in your loop. Database table has a primary key with the numeric IDs. As a result, the loop by adding the unique ID of the recordset object to the id of the div that is played repeatedly. Observe the provided code.

    ... same-except the ability to answer

  • Several PHP repeat regions

    Hey kids,

    IM currently doing an administration page for a school site, which comes in several forms. Basically, each form has a list/menu which will display the names of class... but these names are derived from the database in a repeat region to complete the lists of list/menu... when I went to do a repeat on the next form region, I learned that I can only use a region on a recordset of repetition... does that mean I have to go on creating a recordset for each menu drop-down , I create, or is there an easier way to use multiple regions of repetition of a Recordset, or another way?

    David

    You can have several areas of repetition of a single recordset, but DW doesn't like it.  This means that you are on your own for coding, but fortunately, the task is not too difficult.  The trick is to RESET MySQL pointer within the recordset between repeat with mysql_data_seek() regions (see details here - http://us3.php.net/manual/en/function.mysql-data-seek.php )

    If you're not a hand coder, it's maybe a bit beyond your reach at the time.

    The DW easy to do would be to apply multiple recordsets on the page and use one for each repeat region.

  • Display data in a repeating region: help please!

    I have a MySQL table called "services":

    tbl_services
    Hall
    servlangs
    servlangt

    "servlangs" and "servlangt", get their values from a table "language":

    tbl_language
    LangID
    langname

    I can add records to the table of trouble free service.

    The trouble begins when I present reports in a region of repetition. I have a recordset to filter the data:

    rsServices
    SELECT tbl_language.langname as servlangsource, tbl_service.servid, tbl_service.servlangs, tbl_service.servlangt
    OF tbl_service, tbl_language
    WHERE tbl_language.langid = tbl_service.servlangs

    The repeat region is as follows:

    rsServices.servtitle, rsServices.servlangsource, rsServices.servlangt

    I used the 'servlangsource as' to display the language, instead of the id, name, but I can't understand how to do the same for the value "servlangt".

    Can anyone help?

    You simply create a table alias for the table of the language so that you can reference it again. I don't know what that S & T position, so I'm just adding them to the table and column aliases.

    SELECT tbl_service.servid, tbl_service.servlangs, tbl_service.servlangt, Slang.langname as Sservlangsource, Tlang.langname as Tservlangsource
    OF tbl_service, tbl_language "Slang", tbl_language "Samy".
    WHERE Slang.langid = tbl_service.servlangs AND Tlang.langid = tbl_service.servlangt

  • A repeating region: display the entries of dubble only once

    I want to do a Recordset where all the 'cities' are shown only once, it should not be like

    The Hague

    The Hague

    The Hague

    Rotterdam

    Rotterdam

    Amsterdam

    But:

    The Hague

    Rotterdam

    Amsterdam

    This is the recordset object:

    SELECT c_city FROM canteen

    It's the repeat region:

    <? PHP {? > <? php echo $row_allCities ["c_city'];? > <? php} while ($row_allCities = mysql_fetch_assoc ($allCities));? >

    Thankx for any help!

    Add a SEPARATE statement to your application.

    SELECT DISTINCT c_city canteen

    --
    Lawrence * Adobe Community Expert *.
    www.Cartweaver.com
    All Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF
    www.twitter.com/LawrenceCramer

  • PHP mail - equivalent of the repeat region in the body?

    My client wants a summary of the products registered in the body of an email. My mail script works great, but I don't know how to add the summary of products (what I call a 'repeat region").

    Thanks in advance for your advice and comments

    Hi David,

    Thanks for the help and apologies for not being precise.

    My recordset looks like:

    cust_id product_name order_date
    PRODUCTA 100 23/12/08
    100 PRODUCTB 23/11/07
    100 PRODUCTC 22/09/07

    For example, a client may have 1 or 100 items, so you can see why I want to create the equivalent of a region that is repeated in the body of the message.

    It is more useful to you?

  • problem with layout / repeat region part 2...

    Seems I didn't crack it immediately - have essentially a details page which is cut into three - with details of a candidate upper-left, their profile to work at the top right, with a long CV text appearing below the two.

    All fields are of the table but profiles of School Board candidates - so the profiles must be a repeat region to list them all.

    For the life of me, I can not available to work because I like Tho ' anything appearing afer will not display the repeat region.

    See here:

    link

    Below the header field in the CV CV should appear - as in:

    < b >
    < td colspan = "2" valign = "top" class = 'labelcell' > < table > CV
    < /tr >
    < b >
    < class td = "profilecell" > <? PHP echo $row_Candidates ['CV'];? > < table >
    < /tr >

    But when you view the source, the <? PHP echo $row_Candidates ['CV'];? > is AWOL and appear in the form:

    < b >
    < td colspan = "2" valign = "top" class = 'labelcell' > < table > CV
    < /tr >
    < b >
    < class td = "profilecell" > < table >
    < /tr >

    Someone at - he places what is happening here?

    Just as I thought I had this page presentation done and dusted, as usual, there is something not quite right!

    Iain

    Good news! I managed to fix two problems with this page, by simply adding a second, simple recordset coming interview the candidates table. In doing so, this means that candidates with no display still attached profile and fixed the glitch with the fields showing on the market.

    So, the next thing is to find the page to add/fix the profiles to the candidates.

    Iain

  • Problem with layout / repeat region

    Can someone have a look at this please?

    Essentially two versions of a page of details based on a Recordset by using two tables and an interconnection table of choice.

    The idea is to display the details of the person at the top of the page on the left (from the 'Candidates' table) and right any job "profiles" for this person (in a table of 'Profiles'). The page is obviously just showing the details of the candidate, but must be of * all * profiles associated with.

    So, on the first page, the information is correct, but because it shows the first record in the query.

    So I thought it would be a simple case of add a repeat region to the line of 'Profiles' on the right side. But when I do this, most of the coordinates are displayed not only the ID and name fields.

    http://www.searchtechuk.com/database/candidates2.php

    http://www.searchtechuk.com/database/candidates3.php

    Clues?

    Iain

    Scratch that - just rebuilt the table, and turned with the CSS and it's fine.

    Iain

  • List in a numbered repeating region

    Hi guys, im having problems putting a numbered list in a repeating region (dynamic table). I need the list to indicate the position of the teams in the League, so I just need to list go 1,2,3,4,5, ect.

    I use PHP and mainly in design mode.

    Any help is very appreciated!

    Taylor

    <>

    $number = 0;

    {}

    $number ++;

    ?>

    ClubName GoalDiff Points

    We remind you that the code you are using (MySQL) has been deprecated. Since PHP version 7 it is no longer usable. Take a look to use MySQLi or PDO. Google topics for more information.

  • How to do vertical behaviors repeat region Server?

    I've done many "server behavior, repeat region" vertical list without any installation view, now, I'm a new, horizontal shows that makes no sense. Anyone know why and how to solve this 'bad behavior '?

    You have all the linesin the code of the table - this is why everything is horizontal:

  • Problems with repeated regions...

    For the life of me and little matter how youtube videos and support I looked, I can't do the repeat regions to work in the way they are supposed to. I use Dreamweaver CC 2014.

    For some reason, he repeats the lines by creating new columns to the wide to the right, which is obviously not what I want. What I am doing wrong? Any ideas?

    This is the screenshot from Dreamweaver.

    Thank you-

    Matthew

    Ah I see. In fact, the code is wrong. The tags line),) must be inside the while loop so that a new row in the table is created for each iteration.

    In addition, in the future, it is preferable that send you the code and not a screenshot of the code. Makes it easier for us to see.

  • php repeat region

    I have a number of records in a database - holiday destinations

    Is it possible that I can use a repeat as region below: (I need to call in early January 2014, February 2014 etc. from the database maybe as 'SEPARATE' then repeat destinations under the title of months. Can this be achieved by using a repeat region?

    January 2014

    Bournemouth

    Blackpool

    Cotswolds

    Edinburgh Tattoo

    February 2014

    Wexford

    County Donegal

    Isle of Wight

    Lake District

    Obviously, at the moment I have just a continuous list of destinations using a repeat region:

    <? PHP while ($row = $getHolidayList-> fetch_assoc()) {? >}

    <? PHP echo $row ['destination'];? >

    <? PHP}? >

    I need somehow stop the loop after what he said all destinations associated with January 2014 and begin once again to get out all the destinations associated with February 2014 etc by December 2014.

    I could just create 12 sqli queries and their echo in the loops one after the other, but I also have page navigation buttons once 25 records have made this probably can be done.

    Any suggestions?

    <? PHP while ($row = $getHolidayList-> fetch_assoc()) {? >}

    <? PHP echo $row ["month"];? > (how can be returned only on the first case, it appears in the database field 'months')

    <? PHP echo $row ['destination'];? >

    <? PHP}? >

    Operating system

    > I'll work on it and see if I can simplify it a bit.

    You could try a different approach. Instead of using loops nested, I usually use a simple and just test if the column that you want to not repeat has changed since the last iteration. I'm not a php coder, but here is an attempt in php just to give you the idea.

    <>

    $temp_month = "";

    While ($row = {$getHolidayList-> fetch_assoc())}

    If $temp_month! = $row ["month"] {}

    echo $row ["month"];

    $temp_month = $row ["month"];

    }

    echo $row ['destination'];

    }

    ?>

Maybe you are looking for