Create break in html table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Rob (SA)
    Lieutenant Colonel

    • Nov 2006
    • 586

    Create break in html table

    Hi folks,

    i dont know if I am saying this right but on my page www.gnjgf.co.za/testconcat.php I have managed to sort my tournaments as I would like them preseneted -well to a point that is.

    What I would like to do further is create a break of say three lines once the tournament description changes.

    In this instance it could happen about 5 times.

    Once this is done I would like the headings to be common at the top of each split - naming the tournament.

    Any ideas would be welcome?
    Kind Regards
    Rob
    www.gnjgf.co.za
    www.oryan-projects.com
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: Create break in html table

    Easy if you use loops to display the info, but i can't suggest anything because i don't realy know your code.
    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    • Rob (SA)
      Lieutenant Colonel

      • Nov 2006
      • 586

      #3
      Re: Create break in html table

      Hi George,

      Thanks you for the reply.

      I am not sure to the code either - I am going through a trail and process method of cut and paste with help from people like yourselves.

      I can copy what I think is the code for you and it is this

      $quey1="select * from _Form_Nr_3 ORDER BY `i_wish_to_play` ASC, `surname` ASC ";
      $result=mysql_query($quey1) or die(mysql_error());
      ?>

      Please let me know if this not be the case
      Kind Regards
      Rob
      www.gnjgf.co.za
      www.oryan-projects.com

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: Create break in html table

        No, i mean the code that creates the table and displays the content.

        Further more your page doesn't connect anymore to the database (it did, yesterday that i looked)
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • Rob (SA)
          Lieutenant Colonel

          • Nov 2006
          • 586

          #5
          Re: Create break in html table

          Hi George,

          I have used an html block to create this page and made the changes last night to get it to do what you can currently see at www.gnjgf.co.za/testconcat.php

          Hence me sorting it in order of tournaments - it is really a follow on form my CONCAT exercise if that helps but I copy the other side that I think you are requesting

          $quey1="select * from _Form_Nr_3 ORDER BY `i_wish_to_play` ASC, `surname` ASC ";
          $result=mysql_query($quey1) or die(mysql_error());
          ?>
          <!------------------------------------------------------------------->
          <! THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE >
          <!------------------------------------------------------------------->

          <table border=3 width="85%" style="font-size:11px" cellspacing=0 style="background-color:#FFFFFF;" >
          <!------------------------------------------------------------------->
          <! THIS SECTION CHANGES THE MAIN HEADING >
          <!------------------------------------------------------------------->

          <caption><b><font style="font-size:16px" color="#00008B" face="Arial">
          TOURNAMENT ENTRIES</font><b><caption>

          <!------------------------------------------------------------------->
          <! THIS SECTION CHANGES THE ACTUAL COLUMN HEADINGS >
          <!------------------------------------------------------------------->

          <tr>
          <th><b><font style="font-size:11px" color="#00008B" face="Arial">FULL NAME</font></b></th>
          <th><b><font style="font-size:11px" color="#00008B" face="Arial">HANDICAP</font></b></th>
          <th><b><font style="font-size:11px" color="#00008B" face="Arial">TOURNAMENT</font></b></th>
          </tr>
          <!------------------------------------------------------------------->
          <! THIS SECTION FETCHES THE INFORMATION FROM THE TABLE >
          <!------------------------------------------------------------------->

          <?php
          while($row=mysql_fetch_array($result)){
          echo "</tr><td>";
          echo '<option value="'.$row['surname'].', '.$row['name'].'">'.$row['surname'].', '.$row['name'].'</option>';
          echo "</td><td>";
          echo $row['my_handicap_is'];
          echo "</td><td>";
          echo $row['i_wish_to_play'];
          echo "</td></tr>";
          }
          echo "</table>";
          ?>
          Kind Regards
          Rob
          www.gnjgf.co.za
          www.oryan-projects.com

          Comment

          • Rob (SA)
            Lieutenant Colonel

            • Nov 2006
            • 586

            #6
            Re: Create break in html table

            Hi George,

            I see what you mean by server connection.

            Strange as I know it worked late last night and havent changed anyting in that regard

            All the passwords are as we set them previously.

            I hope this is not to much of a problem - I see it affects all the pages relating to the server and databases
            Kind Regards
            Rob
            www.gnjgf.co.za
            www.oryan-projects.com

            Comment

            • Rob (SA)
              Lieutenant Colonel

              • Nov 2006
              • 586

              #7
              Re: Create break in html table

              Hi George,

              I dont know whats going on but when I go to cpanel the following errror is found:

              #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

              It seems as if all my databases are not there.

              Do you have advice on how I can get them back and how they could have been removed.

              I havent change any configuration and maybe they are working on the servers?

              Ideas in tis regard are welcome
              Kind Regards
              Rob
              www.gnjgf.co.za
              www.oryan-projects.com

              Comment

              • Rob (SA)
                Lieutenant Colonel

                • Nov 2006
                • 586

                #8
                Re: Create break in html table

                Hi George,

                I can only sumise they are working on the server as it is now back to normal.

                A bit of a shock - what happens if the server is down -my system then doesnt work.

                I guess there must be a way to ensure I dont loose info - backup - to where and how do i go about this process?

                Anyway the main thing is we are back and I can see the data.
                Kind Regards
                Rob
                www.gnjgf.co.za
                www.oryan-projects.com

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  Re: Create break in html table

                  The following code should work though i haven't tested it. As you can see you must remove the entire part that creates the headings, as i have moved it in the loop.




                  $quey1="select * from _Form_Nr_3 ORDER BY `i_wish_to_play` ASC, `surname` ASC ";
                  $result=mysql_query($quey1) or die(mysql_error());
                  ?>
                  <!------------------------------------------------------------------->
                  <! THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE >
                  <!------------------------------------------------------------------->
                  <table border=3 width="85&#37;" style="font-size:11px" cellspacing=0 style="background-color:#FFFFFF;" >
                  <!------------------------------------------------------------------->
                  <! THIS SECTION CHANGES THE MAIN HEADING >
                  <!------------------------------------------------------------------->
                  <caption><b><font style="font-size:16px" color="#00008B" face="Arial">
                  TOURNAMENT ENTRIES</font><b><caption>
                  <!------------------------------------------------------------------->
                  <!------------------------------------------------------------------->
                  <! THIS SECTION FETCHES THE INFORMATION FROM THE TABLE >
                  <!------------------------------------------------------------------->
                  <?php
                  while($row=mysql_fetch_array($result)){
                  //----------------------------------------------------------------------------------------------------
                  // THIS SECTION ADDS 3 EMPTY LINES IF THERE IS A SPLIT BUT ONLY AFTER SOME RECORDS HAVE BEEN DISPLAYED
                  //----------------------------------------------------------------------------------------------------
                  if($i > 0 AND $row['i_wish_to_play'] != $last_wish_to_play){
                  echo '<tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  </tr>';
                  }
                  //----------------------------------------------------------------------------------------------------
                  // THIS SECTION ADDS HEADINGS
                  //----------------------------------------------------------------------------------------------------
                  if ($row['i_wish_to_play'] != $last_wish_to_play) {
                  echo '<tr>
                  <td><font style="font-size:11px" color="#00008B" face="Arial"><b>FULL NAME</b></font></td>
                  <td><font style="font-size:11px" color="#00008B" face="Arial"><b>HANDICAP</b></font></td>
                  <td><font style="font-size:11px" color="#00008B" face="Arial"><b>TOURNAMENT</b></font></td>
                  </tr>';
                  }
                  echo "<tr><td>";
                  echo '<option value="'.$row['surname'].', '.$row['name'].'">'.$row['surname'].', '.$row['name'].'</option>';
                  echo "</td><td>";
                  echo $row['my_handicap_is'];
                  echo "</td><td>";
                  echo $row['i_wish_to_play'];
                  $last_wish_to_play = $row['i_wish_to_play'];
                  $i++;
                  echo "</td></tr>";
                  }
                  echo "</table>";
                  ?>
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment

                  • Rob (SA)
                    Lieutenant Colonel

                    • Nov 2006
                    • 586

                    #10
                    Re: Create break in html table

                    Hi George,

                    Thanks again.

                    It works great - I will now look at a way in which the break line does not show a an open line with no values.

                    And get the headings to veiw as per the tournament description.

                    I am beginging to understand more and more as I work with things but as I also see lots and lots of time.

                    Thanks very much very your time
                    Kind Regards
                    Rob
                    www.gnjgf.co.za
                    www.oryan-projects.com

                    Comment

                    • navaldesign
                      General & Forum Moderator

                      • Oct 2005
                      • 12080

                      #11
                      Re: Create break in html table

                      Simple:

                      $quey1="select * from _Form_Nr_3 ORDER BY `i_wish_to_play` ASC, `surname` ASC ";
                      $result=mysql_query($quey1) or die(mysql_error());
                      ?>
                      <!------------------------------------------------------------------->
                      <! THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE >
                      <!------------------------------------------------------------------->
                      <table border=3 width="85&#37;" style="font-size:11px" cellspacing=0 style="background-color:#FFFFFF;" >
                      <!------------------------------------------------------------------->
                      <! THIS SECTION CHANGES THE MAIN HEADING >
                      <!------------------------------------------------------------------->
                      <caption><b><font style="font-size:16px" color="#00008B" face="Arial">
                      TOURNAMENT ENTRIES</font><b><caption>
                      <!------------------------------------------------------------------->
                      <!------------------------------------------------------------------->
                      <! THIS SECTION FETCHES THE INFORMATION FROM THE TABLE >
                      <!------------------------------------------------------------------->
                      <?php
                      while($row=mysql_fetch_array($result)){
                      //----------------------------------------------------------------------------------------------------
                      // THIS SECTION ADDS 3 EMPTY LINES IF THERE IS A SPLIT BUT ONLY AFTER SOME RECORDS HAVE BEEN DISPLAYED
                      //----------------------------------------------------------------------------------------------------
                      if($i > 0 AND $row['i_wish_to_play'] != $last_wish_to_play){
                      echo '<tr>
                      <td colspan="3">&nbsp;</td>
                      </tr>';
                      }
                      //----------------------------------------------------------------------------------------------------
                      // THIS SECTION ADDS HEADINGS
                      //----------------------------------------------------------------------------------------------------
                      if ($row['i_wish_to_play'] != $last_wish_to_play) {
                      echo '<tr>
                      <td align="center"><font style="font-size:11px" color="#00008B" face="Arial"><b>FULL NAME</b></font></td>
                      <td align="center"><font style="font-size:11px" color="#00008B" face="Arial"><b>HANDICAP</b></font></td>
                      <td align="center"><font style="font-size:11px" color="#00008B" face="Arial"><b>'.$row['i_wish_to_play'].'</b></font></td>
                      </tr>';
                      }
                      echo "<tr><td>";
                      echo '<option value="'.$row['surname'].', '.$row['name'].'">'.$row['surname'].', '.$row['name'].'</option>';
                      echo "</td><td>";
                      echo $row['my_handicap_is'];
                      echo "</td><td>";
                      echo $row['i_wish_to_play'];
                      $last_wish_to_play = $row['i_wish_to_play'];
                      $i++;
                      echo "</td></tr>";
                      }
                      echo "</table>";
                      ?>
                      Navaldesign
                      Logger Lite: Low Cost, Customizable, multifeatured Login script
                      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                      Comment

                      • Rob (SA)
                        Lieutenant Colonel

                        • Nov 2006
                        • 586

                        #12
                        Re: Create break in html table

                        Thanks George,

                        Can I make the break line to veiw eaxctly like the background in the page or is that more difficult?
                        Kind Regards
                        Rob
                        www.gnjgf.co.za
                        www.oryan-projects.com

                        Comment

                        • navaldesign
                          General & Forum Moderator

                          • Oct 2005
                          • 12080

                          #13
                          Re: Create break in html table

                          $quey1="select * from _Form_Nr_3 ORDER BY `i_wish_to_play` ASC, `surname` ASC ";
                          $result=mysql_query($quey1) or die(mysql_error());
                          ?>
                          <!------------------------------------------------------------------->
                          <! THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE >
                          <!------------------------------------------------------------------->
                          <table border=3 width="85%" style="font-size:11px" cellspacing=0>
                          <!------------------------------------------------------------------->
                          <! THIS SECTION CHANGES THE MAIN HEADING >
                          <!------------------------------------------------------------------->
                          <caption><b><font style="font-size:16px" color="#00008B" face="Arial">
                          TOURNAMENT ENTRIES</font><b><caption>
                          <!------------------------------------------------------------------->
                          <!------------------------------------------------------------------->
                          <! THIS SECTION FETCHES THE INFORMATION FROM THE TABLE >
                          <!------------------------------------------------------------------->
                          <?php
                          while($row=mysql_fetch_array($result)){
                          //----------------------------------------------------------------------------------------------------
                          // THIS SECTION ADDS 1 EMPTY LINE IF THERE IS A SPLIT BUT ONLY AFTER SOME RECORDS HAVE BEEN DISPLAYED
                          //----------------------------------------------------------------------------------------------------
                          if($i > 0 AND $row['i_wish_to_play'] != $last_wish_to_play){
                          echo '<tr>
                          <td colspan="3">&nbsp;</td>
                          </tr>';
                          }
                          //----------------------------------------------------------------------------------------------------
                          // THIS SECTION ADDS HEADINGS
                          //----------------------------------------------------------------------------------------------------
                          if ($row['i_wish_to_play'] != $last_wish_to_play) {
                          echo '<tr>
                          <td align="center"><font style="font-size:11px" color="#00008B" face="Arial"><b>FULL NAME</b></font></td>
                          <td align="center"><font style="font-size:11px" color="#00008B" face="Arial"><b>HANDICAP</b></font></td>
                          <td align="center"><font style="font-size:11px" color="#00008B" face="Arial"><b>'.$row['i_wish_to_play'].'</b></font></td>
                          </tr>';
                          }
                          echo '<tr><td bgcolor="#FFFFFF">';
                          echo '<option value="'.$row['surname'].', '.$row['name'].'">'.$row['surname'].', '.$row['name'].'</option>';
                          echo '</td><td bgcolor="#FFFFFF">';
                          echo $row['my_handicap_is'];
                          echo '</td><td bgcolor="#FFFFFF">';
                          echo $row['i_wish_to_play'];
                          $last_wish_to_play = $row['i_wish_to_play'];
                          $i++;
                          echo '</td></tr>';
                          }
                          echo '</table>';
                          ?>
                          Navaldesign
                          Logger Lite: Low Cost, Customizable, multifeatured Login script
                          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                          Comment

                          • Rob (SA)
                            Lieutenant Colonel

                            • Nov 2006
                            • 586

                            #14
                            Re: Create break in html table

                            Thanks again,

                            Good progress.

                            The page shows good - it is just the heading lines that are now also showing the background - whereas its is the blank line / break that I wanted like the background.

                            The break line is good - just the heading line should be as normal table.
                            Kind Regards
                            Rob
                            www.gnjgf.co.za
                            www.oryan-projects.com

                            Comment

                            • navaldesign
                              General & Forum Moderator

                              • Oct 2005
                              • 12080

                              #15
                              Re: Create break in html table

                              $quey1="select * from _Form_Nr_3 ORDER BY `i_wish_to_play` ASC, `surname` ASC ";
                              $result=mysql_query($quey1) or die(mysql_error());
                              ?>
                              <!------------------------------------------------------------------->
                              <! THIS SECTION CHANGES WHAT THE TABLE LOOKS LIKE >
                              <!------------------------------------------------------------------->
                              <table border=3 width="85%" style="font-size:11px" cellspacing=0>
                              <!------------------------------------------------------------------->
                              <! THIS SECTION CHANGES THE MAIN HEADING >
                              <!------------------------------------------------------------------->
                              <caption><b><font style="font-size:16px" color="#00008B" face="Arial">
                              TOURNAMENT ENTRIES</font><b><caption>
                              <!------------------------------------------------------------------->
                              <!------------------------------------------------------------------->
                              <! THIS SECTION FETCHES THE INFORMATION FROM THE TABLE >
                              <!------------------------------------------------------------------->
                              <?php
                              while($row=mysql_fetch_array($result)){
                              //----------------------------------------------------------------------------------------------------
                              // THIS SECTION ADDS 1 EMPTY LINE IF THERE IS A SPLIT BUT ONLY AFTER SOME RECORDS HAVE BEEN DISPLAYED
                              //----------------------------------------------------------------------------------------------------
                              if($i > 0 AND $row['i_wish_to_play'] != $last_wish_to_play){
                              echo '<tr>
                              <td colspan="3">&nbsp;</td>
                              </tr>';
                              }
                              //----------------------------------------------------------------------------------------------------
                              // THIS SECTION ADDS HEADINGS
                              //----------------------------------------------------------------------------------------------------
                              if ($row['i_wish_to_play'] != $last_wish_to_play) {
                              echo '<tr>
                              <td align="center" bgcolor="#FFFFFF"><font style="font-size:11px" color="#00008B" face="Arial"><b>FULL NAME</b></font></td>
                              <td align="center" bgcolor="#FFFFFF"><font style="font-size:11px" color="#00008B" face="Arial"><b>HANDICAP</b></font></td>
                              <td align="center" bgcolor="#FFFFFF"><font style="font-size:11px" color="#00008B" face="Arial"><b>'.$row['i_wish_to_play'].'</b></font></td>
                              </tr>';
                              }
                              echo '<tr><td bgcolor="#FFFFFF">';
                              echo '<option value="'.$row['surname'].', '.$row['name'].'">'.$row['surname'].', '.$row['name'].'</option>';
                              echo '</td><td bgcolor="#FFFFFF">';
                              echo $row['my_handicap_is'];
                              echo '</td><td bgcolor="#FFFFFF">';
                              echo $row['i_wish_to_play'];
                              $last_wish_to_play = $row['i_wish_to_play'];
                              $i++;
                              echo '</td></tr>';
                              }
                              echo '</table>';
                              ?>

                              Where is the edited page ? can't seem to find it
                              Navaldesign
                              Logger Lite: Low Cost, Customizable, multifeatured Login script
                              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                              Comment

                              Working...
                              X