Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 10-14-2010, 05:00 AM Pagination help
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Hey,

I have a problem which i don't know how to solve.
The problem is that my db rows are displayed in a div tag that has a limited width and height and my db field is 150 characters max.

So when i insert 10 records that are 150 characters long i get 10 rows on my display page which is fine, and design looks ok, but the problem begins when those records are less than 150 characters long.
I have a lot of blank space and i get page #2 which i won't to avoid.

Anyone have an idea?
I was thinking, maybe i can check the length and increase my display limit?
miki86 is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-14-2010, 02:56 PM Re: Pagination help
orionoreo's Avatar
Ultra Talker

Posts: 335
Name: Jerry
Trades: 0
sorry but i'm having a hard time visualizing a problem here.. if your row doesn't have 150 characters there should be spaces if you have set row widths
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
orionoreo is offline
Reply With Quote
View Public Profile
 
Old 10-14-2010, 04:12 PM Re: Pagination help
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Ok, see the pictures.
This one is ok:


This one is not ok, i want to avoid that blank space:


I hope you understand me now.
EDIT: I want to print more records instead of that blank space, so basically i want to print records until they hit the end of the div element.

Last edited by miki86; 10-14-2010 at 04:20 PM..
miki86 is online now
Reply With Quote
View Public Profile
 
Old 10-15-2010, 08:05 AM Re: Pagination help
captkrackerjack's Avatar
Experienced Talker

Latest Blog Post:
Moved Blog to NGINX!
Posts: 31
Name: Greg
Location: California
Trades: 0
What does your code look like? It seems as if even though there is no data, whatever you have keeps creating space that don't have data. Check your loops to determine if that is not the problem.
__________________

Please login or register to view this content. Registration is FREE

Fav sites; last.fm, mashable.com, speckyboy.com
captkrackerjack is offline
Reply With Quote
View Public Profile Visit captkrackerjack's homepage!
 
Old 10-15-2010, 08:23 AM Re: Pagination help
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
No, you dont understand the problem.
div element height is 500px. If my db record has 150 chars, row height is 48px thats 10 records display on one page.
If my record has less than 100 chars, row height is 34px, thats 15 records per page.

I used some math and loop is ok but right now im having some problems with passing offset variable to my second page because of my page structure and functions that i wrote, but im gonna solve that somehow.
miki86 is online now
Reply With Quote
View Public Profile
 
Old 10-15-2010, 08:46 AM Re: Pagination help
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
You could pass data to other pages by using sessions ?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 10-15-2010, 10:11 AM Re: Pagination help
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
I did it with cookies, everything looks ok now.
Appreciate your help.
miki86 is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Pagination help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44735 seconds with 12 queries