multiple records per row

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default multiple records per row

    Ok guys, this is a simple question I know but I'm a php noob. I can display
    1 record per row just fine, exactly the way I want, however, I want to
    display 3 records per row. I'm assuming I need to use some sort of counter
    to do this but I'm not sure how the code should look to make this happen.
    Can anyone give me some help OR online resources that deal with this
    subject. Thanks in advance.

    Jason


    DotKom Guest

  2. Similar Questions and Discussions

    1. CF Multiple Queries, Multiple Records
      All, I've got three queries all passing variables from previous queries. The issues? The second query returns 4 records. I want to use IDs for...
    2. update multiple records in multiple tables from one form
      hello I have been trying to run multiple update queries based on the data entered by user. Brief background: I am fetching data from various...
    3. Deleting multiple records
      Here's what I have... A table with 3 columns. Headings are (Name, Prayer Request, and Delete). A loop that goes through a Record Set and prints...
    4. help-how to merge multiple records into 1
      these exist in a both excel and filemakerpro, in fmpro, they are single records, i want to merge single records into 1 record based on the same...
    5. adding multiple records
      Thanks Perry, I am not sure what : (" & (nBsae £« 1£ > © & " )") is as the characters are not normal? could you please repost, thank...
  3. #2

    Default Re: multiple records per row

    DotKom wrote:
    > Ok guys, this is a simple question I know but I'm a php noob. I can
    > display 1 record per row just fine, exactly the way I want, however, I
    > want to display 3 records per row. I'm assuming I need to use some sort of
    > counter to do this but I'm not sure how the code should look to make this
    > happen. Can anyone give me some help OR online resources that deal with
    > this subject. Thanks in advance.
    >
    > Jason
    I'm not going to give you the answer directly, but here's a hint: fields in
    a single row are indexed like arrays.

    Say you fetch a row from a database with the following SQL statement:
    SELECT foo,bar FROM baz WHERE snafu="fubar";
    (?? this looks right...could be wrong too, SQL 'aint my strong point :P)

    You'll get a bunch of rows back with two fields; foo and bar. Let's assume
    you fetched the rows into a result set called $myrow.
    Now these fields can be indexed like arrays:
    $myrow[0]; // ie, foo - the 1st (or 0th) index
    $myrow[1]; // ie, bar - the 2nd (0th +1) index

    Geddit? Depending on how you fetched your result set you can even refer to
    them like this;
    $myrow[foo];
    $myrow[bar];

    Neat huh? Do some reading at [url]http://www.php.net/[/url] (look at the examples in
    MySQL command set) and if you're still stuck, have a look at other people's
    code at places like [url]http://www.hotscripts.com/[/url]

    Good luck.

    James
    --
    You will pioneer the first Martian colony.

    Centurion Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139