Horizontal/vertical repeat region PhP/MySQL

Hi guys,.

I'm sure that this issue would have been requested many times before. If so, my apologies for the re - this announcement first.

In any case, what I'm trying to do is create a repeat region that spans 4 columns and then repeat the rest in rows. For example, if I have 100 records in my table (MySQL), so I want to display in a table of 4 columns and 25 rows and (in reality, the number of records would be indeterminate, of course, but still records must be displayed on a 4 X line table column). For example:

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

name

Comment

For the moment, I have no problem with displaying the records vertically or horizontally (explicitly) by using the behavior 'repeat region. However, when I have the problem is with displaying records in a table like the one I described above.

I use PS CS5 with PhP/MySQL.

Can I still do this in server behavior "repeat region", using the If yes how?

Otherwise, if not, how could I achieve this (ideally without using extensions)?

Thanks in advance for any help and support,

See you soon

The Horizontal Looper to Tom Muck is perhaps something for you:

http://www.Tom-Muck.com/extensions/

Tags: Dreamweaver

Similar Questions

  • 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:

  • 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.

  • Repeat region repeat horizontally?

    I have a small table with dynamic data in it and I made the table into a repeating region.

    It's the table repeats vertically and I need to repeat horizontally. How can I get there? Is there something that I can add or subtract the code?

    My test page is at http://www.dallasmodelworks.com/horse/aisle_loco_test.asp

    (Ignore the missing images; I have not yet put the URL of the image in the database)

    Help, please.

    Craig

    It's free and it works. Thank you!

    http://www.Tom-Muck.com/extensions/help/HorizontalLooper/index.cfm

    He seems to have been designed for MX but works to the v8.

    I'm surprised Macromedia/Adobe have not integrated in DW - seems like a logical thing to do.

    c

  • 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'];

    }

    ?>

  • repeating region of php email function doesn't work do not

    I have a form which should be sent by electronic mail and like products attached to it. However, I have a repeat region to list all products, but when I send the e-mail Island shows that the first item on the list.


    below is the form set up

    emailer

    E-mail information new tenant

            $to = ' [email protected] ';// . ',' . "$row_rsOrder ['email']";

    $to = $row_rsOrder ['email'];

    $subject = "order details";

    $message ="

    < html >

    < head >

    < title > Dear ".» $row_rsOrder ["FirstName"]. $row_rsOrder ["LastName"]. "Please see the details of your order below < /title >

    < / head >

    < body >

    " < img src =-" http://www.website.com/images/logoBLPP.jpg \" alt=\"" />

    Your order of B < h2 >. $row_rsOrder ["OrderID"]. "< / h2 >

    < table width = "800" border = "0" cellspacing = "0" cellpadding = "0" >

    < tr > < td > < p > thank you for shopping below are you details of the order you placed recently. If you have any questions please contact us < /p >

    < br / >

    < /a > < /p >

    < tr > < td > < table > < /tr > < / table >

    < table width = '980' border = "1" cellspacing = "0" cellpadding = "10" >

    < tr valign = "top" >

    < td bgcolor = "#E9E9E9" class = "header1" > Customer Name < table >

    < class td 'text' = > "." $row_rsOrder ["FirstName"]. $row_rsOrder ["LastName"]. "< table >

    < td bgcolor = "#E9E9E9" class = "header1" > Order ID < table >

    < td bgcolor = "#E9E9E9" class = "text" > "." $row_rsOrder ["OrderID"]. "< table >

    < td bgcolor = "#E9E9E9" class = "header1" > status command < table >

    < class td 'text' = > "." $row_rsOrder ["TransactResult"]. "< table >

    < /tr >

    < tr valign = "top" >

    < td bgcolor = "#E9E9E9" class = "header1" > Email < table >

    < class td 'text' = > "." $row_rsOrder ['email']. "< table >

    < td bgcolor = "#E9E9E9" class = "header1" > < table >

    < class td = "text" > < table >

    < td bgcolor = "#E9E9E9" > < span class = "header1" > </span > < table > Order Date

    < class td 'text' = > '.makeDateTime ($row_rsOrder ["OrderDate"], '%#d %B %Y', true). "< table >

    < /tr >

    < tr valign = "top" >

    < td bgcolor = "#E9E9E9" class = "header1" > shipping address < table >

    < class td = "text" > < p > "." $row_rsOrder ['address']. "< /p >

    < p > "." $row_rsOrder ['city']. "< /p >

    < p > "." $row_rsOrder ['postal code']. "< /p >

    < p > "." $row_rsOrder ['country']. "< /p >

    < p > < /p > < table >

    < td > < table >

    < td > < table >

    "< td colspan ="2"align ="right"valign ="bottom"> < span class ="head"> ORDER TOTAL: DoFormatCurrency ($row_rsOrder ['Total'], 2, ','.', ' £', ""). "". "< br / >"

    "</span > < span class ="text"> shipment: DoFormatCurrency (['shipping'], 2 $row_rsOrder, ','.', ' £', ""). "". "</span > < span class ="head"> < br / >"

    </span > < table >

    < /tr >

    < tr valign = "top" >

    < td bgcolor = "#E9E9E9" class = "header1" > Product ID < table >

    < td bgcolor = "#E9E9E9" class = "header1" > < table > Product Description

    < td bgcolor = "#E9E9E9" colspan = "2" class = "header1" > size < table >

    < td bgcolor = "#E9E9E9" > < span class = "header1" > quantity </span > < table >

    < td bgcolor = "#E9E9E9" align = "right" > < span class = "header1" > price </span > < table >

    < /tr >

          <? php do { ?>

    < tr valign = "top" >

    < class td 'text' = > "." $row_rsOrder ['ProductID']. "< table >

    < class td 'text' = > "." $row_rsOrder ['product']. «, ». $row_rsOrder ["productGroupGUID"]. "< table >

    < td colspan = "2" class = "text" > "." $row_rsOrder ["UnitSize"]. "< table >

    < td > < span class = "text" > "." $row_rsOrder ['quantity']. "</span > < table >

    < td align = 'right' class = "text" > ". DoFormatCurrency ($row_rsOrder ["UnitPrice'"], 2, ','.', ' £', ""). "." "< table >

    < /tr >

          <? php } while ($row_rsOrder = mysql_fetch_assoc($rsOrder)); ?>

    < tr valign = "top" >

    < class td = "text" > < table >

    < class td = "text" > < table >

    < td colspan = "2" class = "text" > < table >

    < td > < table >

    < td > < table >

    < /tr >

    < /table >

    < / body >

    < / html >

    ";

    Content-type always defined when sending HTML email

    $headers = "MIME-Version: 1.0 '. « \r\n » ;

    $headers. = "content-type: text / html;" Charset = UTF-8 ". « \r\n » ;

    $headers. = "from: company name < " [email protected] > '. "\r\n";

    $send = mail ($ $subject, $message, $headers);

    Yes, all THE information in the database was recovered and sent to the email. Only 3 products for test purposes.

    I just tested it down to the do-while loop. After that html table code is absent.

    You have to bare in mind, this is a crude test. The updated database in place the query is not as complex as yours is, so maybe it's why his work, but certainly break the 'message' is the way to go. I can try to get another table products tomorrow if I have time to test.

    Database to html code and column names are the same as you have. the recordeset is "rsOrders" instead of "Mina" that you used.

    <>

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    @mysql_select_db ($database_conDonations, $conDonations);

    $query_rsOrders = "SELECT * FROM orders";

    $rsOrders = mysql_query ($query_rsOrders, $conDonations) or die (mysql_error ());

    $row_rsOrders = mysql_fetch_assoc ($rsOrders);

    $totalRows_rsOrders = mysql_num_rows ($rsOrders);

    emailer

    E-mail information new tenant

    $to = ' [email protected]'; / /. ',' . "$row_rsOrder ['email'];

    $to = $row_rsOrder ['email'];

    $subject = "order details";

    $message ="

    Dear ".» $row_rsOrders ["FirstName"]. "see your order below details

    ' http://www.website.com/images/logoBLPP.jpg-' alt =------"------" / >

    Your order of B. $row_rsOrders ["OrderID"]. »

    Thank you for shopping below are you details of the order you placed recently. If you have any questions please contact us


    Name of the customer «. $row_rsOrders ["FirstName"]. » Command ID «. $row_rsOrders ["OrderID"]. » Status of orders «. $row_rsOrders ["TransactResult"]. »
    E-mail «. $row_rsOrders ['email']. » Order date «. $row_rsOrders ["OrderDate"]. »
    Shipping address

    «. $row_rsOrders ['address']. »

    «. $row_rsOrders ['city']. »

    «. $row_rsOrders ['postal code']. »

    «. $row_rsOrders ['country']. »

    ORDER TOTAL: "." $row_rsOrders ['total']. »

    Shipping: "." $row_rsOrders ["expedition"]. »

    Product ID

    Product description

    Size

    Quantity

    Price

    ";

    ?>

    "?>

    «. $row_rsOrders ['product']. »

    «. $row_rsOrders ["UnitSize"]. »

    «. $row_rsOrders ['quantity']. »

    «. $row_rsOrders ['UnitPrice']. »

    ";

    ?>

    "?>

    Content-type always defined when sending HTML email

    $headers = "MIME-Version: 1.0 '. « \r\n » ;

    $headers. = "content-type: text / html;" Charset = UTF-8 ". « \r\n » ;

    $headers. = "from: company name [email protected]> '."\r\n";"

    $send = mail ($ $subject, $message, $headers);

    mysql_free_result ($rsOrders);

    ?>

  • How can I do a vertical mosaic repeat region?

    Hi, I have the following repeat region which tiles all from top to bottom.

    Can I change to make it tiles two wide and then down?

    < %
    While (NOT rsPublication.EOF) AND ((Repeat1__numRows <> 0))
    % >
    < b >
    < td width = "20%" bordercolor = "#ECECD7" > < div align = "center" > < A HREF = "publication - description.asp?" < % = MM_keepNone & MM_joinChar (MM_keepNone) & "idBook =" & rsPublication.Fields.Item ("idBook"). Value% > "> < img src =" < % = (rsPublication.Fields.Item("idImage"). "» (% De la valeur) > "name ="apaewh"id ="apaewh"> < / a > < / div > < table >
    < td width = "80%" height = "126" colspan = "3" bgcolor = "#ECECD7" >
    < p align = "left" > < A HREF = "publication - description.asp?" < % = MM_keepNone & MM_joinChar (MM_keepNone) & "idBook =" & rsPublication.Fields.Item ("idBook"). "Value% >" > < font size = "3" > < % = (rsPublication.Fields.Item("idTitle"). % of the value) > < / police > < /A > < br >
    Author: < % = (rsPublication.Fields.Item("idAuthor"). % of the value) > < br >
    Publisher: < % = (rsPublication.Fields.Item("idPublisher"). % of the value) > < br >
    < br >
    & copy; < % = (rsPublication.Fields.Item("idDate"). % of the value) > | ISBN: < % = (rsPublication.Fields.Item("idISBN"). % of the value) > | < % = (rsPublication.Fields.Item("idBinding"). % of the value) > | < % = (rsPublication.Fields.Item("idPages"). % of the value) > Pages < br >
    < br >
    Price: to THE$ < % = (rsPublication.Fields.Item("idPrice"). % of the value) >.95 (including GST). < color = "#333333" > < / police > < / p >
    < table >
    < /tr >
    < %
    Repeat1__index = Repeat1__index + 1
    Repeat1__numRows = Repeat1__numRows-1
    rsPublication.MoveNext)
    Wend
    % >

    Thanks Mally.

    Thank you guys.

  • 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?

  • 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.

  • get the price of php/mySQL database

    I have the need to get prices from a database and display them on a page.

    I can use a repeat region (see below), but need to reset it before to loop through the database for other prices. I need to do this because prices are scattered all over the page.

    <? PHP {? >}

    <? PHP

    If ($row_productPrice ["productName"] == "Nozzles") {}

    echo $row_productPrice ["productPrice"];

    }

    ? >

    <? PHP} while ($row_productPrice = mysql_fetch_assoc ($productPrice));? >

    Then reset the Recordset (before a loop in the database again):

    <? PHP

    reset the recordset after a repeat region

    mysql_data_seek ($productPrice, 0);

    get the first row of the recordset object

    $row_productPrice = mysql_fetch_assoc ($productPrice);

    ? >

    OR I can do it by repeating the same mysql query over and over again before the echo of the productPrice:

    <? PHP

    @mysql_select_db ($database_conProduct, $conProducts);

    $query_productPrice = "SELECT productPrice FROM Products WHERE productName = 'Air jets" ";

    $productPrice = mysql_query ($query_productPrice, $conProducts) or die (mysql_error ());

    $row_productPrice = mysql_fetch_assoc ($productPrice);

    $totalRows_productPrice = mysql_num_rows ($productPrice);

    ? >

    <? PHP echo $row_productPrice ["productPrice"];? >

    Both solutions work, but seem a little rough me is an alternative solution which would make the code more efficient?

    See you soon

    Operating system.

    Reset the data pointer is not messy, really - I often do.  But why not just read the game of records once and put in place all of your prices in this reading?

    So, for the original Recordset, pull the two product name * and * price of the product ($rsProducts), can have something like that.

    {}

    switch ($row_rsProducts ['productName']) {}

    case "nozzle":

    $airNozzle = $row_rsProducts ["productPrice"];

    break;

    case "string":

    $hoseClamp = $row_rsProducts ["productPrice"];

    break;

    case 'Venturi Tube':

    $venturiTube = $row_rsProducts ["productPrice"];

    break;

    / * continue for each product name, and you will then have a series of variables, including the sensible name, each containing the desired price * /.

    } / * end of stroke * /.

    } While ($row_rsProducts = (mysql_fetch_assoc ($rsProducts));

    Then when you need a price on the page (similar to a venturi tube), you can just do-

    echo $venturiTube;

    Would this work?

  • 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.

  • Checkbox question repeat region/Bind ID

    In Dreamweaver CS4, I have a dynamic text field that displays a list of names of my Mysql database, using the repeat region, and I have a few boxes next to the dynamic text field.

    How I assign/link check boxes them so that it will be up to each individual name in the list? I just need some general indications if poss please. Is this something to do with PHP and Bind ID?

    Thank you very much

    Andy

    Yes a single line to repeat region will repeat in the box and add dynamic modules for the value of each entry in the repeating region.

  • PHP + MySQL - data presentation

    Hi guys,.

    At the beginning:

    I'm developing a web application using PHP and MySQL. The MySQL database contains several tables, including some to connect.

    I have a table called "freelancers", contains general information about the "freenlancer".

    Linked to this is a table called 'services' (linked by a foreign key), this table contains service information that provides the 'freelance '.

    Service table using another table called 'language', which holds securities (EN, FR, etc), twices, once for a 'source language' and even 'target language '.

    I use insert records to fill the table of service without problem, if I display the data in the services table, I can see the values of table of correct language... I hope that makes sense!

    The problem:

    On the details page of the freelance, I use a repeat on the services provided in a table region, but the source and target languages appear in format digital, and not the label stored in the languages table.

    Does anyone know how can I fill the values of language with labels rather than numeric values, I tried to add an extra repeat region in the table, but cannot do it as a repeat region is already in place for the services.

    If anyone can help with that, it would be amaxing, I can provide the sql statements and data from php, if necessary.

    Thank you

    Kool_Samule

    I can understand what your situation but I can be more understanding if you could provide us with sql and php data.

  • Display multiple records of repeat region


    I have two sets of data:

    Recordset1, as well as other information, contains the index corresponding recordset2

    I have set up a repeating region and need a field of recordset2 to display data record1. I really tried everything, but it seems no way to control what cs3 order puts the php for mysql read code. I can easily put on a list menu and cs3 doing the code for select recordset2 correctly but it is a display and I don't know there is something simple, I'm missing and appreciate in advance your time and advice.



    I am running php 5 and mysql 5 on my vista IIS machine.

    azunoman wrote:
    > I have two sets of data:
    >
    > recordset1, as well as other information, contains the index of
    > corresponding recordset2
    >
    > I have set up a repeating region and need a recordset2 field to display
    > given record1. I really tried everything, but it does not seem possible
    > control what cs3 order puts the php for mysql read code. I can easily put
    > in a menu list and cs3 will do the code to select recordset2 correctly, but it is
    > a screen and I'm sure there's something simple I'm missing and enjoy
    > to advance your time and advice.
    >
    >
    >
    > I'm using php 5 and mysql 5 on my vista IIS machine.

    You need a set of records, and that we will use what is called a JOIN.
    You implement the join in your SQL statement. Do a google on mysql join
    and see if it makes no sense. Otherwise, post your 2 existing SQL
    statements and we will see if we can do for you.

    Steve

  • image of exchange within the repeat region

    I am trying to configure a swap image behavior of in a dataset of the repeat region using php/mysql model. Someone at - it help him? See you soon.

    Thank you Rob, who did it. Code below.


    {? >}
    &productID=" onmouseover="MM_swapImage('productImage','','images/',1)" onmouseout="MM_swapImgRestore()">

Maybe you are looking for