![]() |
|
| |||||||
| Notices |
| mySQL & PHP Discussions, information and help with mySQL and PHP. |
![]() |
| | Thread Tools |
|
#1
| ||||
| ||||
|
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? |
|
#2
| ||||
| ||||
|
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! |
|
#3
| ||||
| ||||
|
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 |
|
#4
| ||||
| ||||
|
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! |
|
#5
| ||||
| ||||
|
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>"; ?> |
|
#6
| ||||
| ||||
|
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 |
|
#7
| ||||
| ||||
|
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 |
|
#8
| ||||
| ||||
|
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. |
|
#9
| ||||
| ||||
|
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%" 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> </td> <td> </td> <td> </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! |
|
#10
| ||||
| ||||
|
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 |
|
#11
| ||||
| ||||
|
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%" 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"> </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! |
|
#12
| ||||
| ||||
|
Thanks George, Can I make the break line to veiw eaxctly like the background in the page or is that more difficult? |
|
#13
| ||||
| ||||
| $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"> </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! |
|
#14
| ||||
| ||||
|
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. |
|
#15
| ||||
| ||||
|
$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"> </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! |
|
#16
| ||||
| ||||
|
Hi George, Looking much better thank you. Page is www.gnjgf.co.za/testconcat.php It looks good except the > shows in places - dont know why but will try and try |
|
#17
| ||||
| ||||
| Quote:
__________________ 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! |
|
#18
| ||||
| ||||
|
hi George, I have sorted it out The headings were having a > at the begining of each title and I think it was because of this $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 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"> </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>'; Shown in red above - so I deleted it and it seems to have had the desired effect. |
|
#19
| ||||
| ||||
|
Yes, my mistake
__________________ 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! |
|
#20
| ||||
| ||||
|
hi George, No problem at all. I am only glad that I am learning and getting to see how to fix things a little by little with your guidance. You will see I am playing a bit now to get the tournament to be as it is at the top and then the headings - name, handicap etc just below that. It seems I have to play a bit with the order of things to get this to happen by manipulation of the <tr> command. I am glad we have got it to where we are because it helps me to relaise how powerful the datbase manipulation can be in achieving the lower administration requirements we need on this website. your support is truly appreciated |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |