MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 7th, 2003, 11:43 PM
Vasarab69 Vasarab69 is offline
Goldmember
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 71 Vasarab69 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 25 sec
Reputation Power: 6
Send a message via AIM to Vasarab69
Spaning MySQL results over multiple pages

hello, haven't been around too much lately, but, i have run into a problem! for a certain site, i originally wished to display member bio's from a database, have a form to add a new bio, etc. and everything worked out and went fine...now, the member's are increasing in number and i've worked out a search feature and all of that good stuff but i don't have a clue as to how to span the biographies on the REG. "bios.php" over multiple pages. i retrieve the info from the db using the following code; the database accessing class, etc, is based off of Ben Rowe's fabulous core, here goes:

PHP Code:
function getbios() {

        
$dbVars = new dbVars();
        @
$svrConn mysql_connect($dbVars->strServer$dbVars->strUser$dbVars->strPass);

        if(
$svrConn)
                {
                        
$dbConn mysql_select_db($dbVars->strDb$svrConn);

                        if(
$dbConn)
                                {
                                
                                
$query "SELECT * FROM members";
                                
$result mysql_query($query);
                                                                
                                if(
$result != NULL) {
                                
                                echo 
'<table width="50%" border="1" bordercolor="#FFFFFF" cellpadding="3" cellspacing="3">';
                                
                                while(
$row mysql_fetch_array($result)) {
                                
                                    echo 
' <p>';
                                    echo 
'  <tr>';
                                    echo 
'    <td height="117" colspan="2"><center><img src="' $row[8] .'"></center></td>';
                                    echo 
'  </tr>';
                                    echo 
'  <tr>';
                                    echo 
'    <td width="30%">Name</td>';
                                    echo 
'    <td width="70%">' $row[1] . '</td>';
                                    echo 
'  </tr>';
                                    echo 
'  <tr>';
                                    echo 
'    <td>Age</td>';
                                    echo 
'    <td>' $row[2] . '</td>';
                                    echo 
'  </tr>';
                                    echo 
'  <tr>';
                                    echo 
'    <td>E-mail</td>';
                                    echo 
'    <td>' $row[3] . '</td>';
                                    echo 
'  </tr>';
                                    echo 
'  <tr>';
                                    echo 
'    <td>Position</td>';
                                    echo 
'    <td>' $row[4] . '</td>';
                                    echo 
'  </tr>';
                                    echo 
'  <tr>';
                                    echo 
'    <td>Status</td>';
                                    echo 
'    <td>' $row[5] . '</td>';
                                    echo 
'  </tr>';
                                    echo 
'  <tr>';
                                    echo 
'    <td>AIM</td>';
                                    echo 
'    <td>' $row[6] . '</td>';
                                    echo 
'  </tr>';
                                    echo 
'  <tr>';
                                    echo 
'    <td>MSN</td>';
                                    echo 
'    <td>' $row[7] . '</td>';
                                    echo 
'  </tr>';
                                    echo 
' </p>';
                                    
                                }
                                
                            echo 
'</table>';
                                
                            } else {
                            
                            echo 
'There are currently no members.';
                            
                            }
                            
                        }
                        
                    }
                    
                } 


what code needs to be added, and also, plz correct any small mistakes i may have made , many thanks
__________________
-Alexander

Reply With Quote
  #2  
Old April 8th, 2003, 01:02 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Spaning MySQL results over multiple pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway