It is currently Mon May 21, 2012 1:29 pm

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Mon May 24, 2004 5:34 pm 
Offline

Joined: Thu May 20, 2004 6:29 pm
Posts: 12
Ok....have it working now...kewlness...thanks for the help. I have found one other interesting thing hopefully you can help me with.

In my first table I have my records and (during test mode) I want to only display two records at a time. I have a Next and Previous link defined to show the Next two or of course Previous two records. Here's where it is interesting.

After clicking on an item in the table, it is always moving back to the first record. Even though I have clicked on Next to display records 3 and 4. If I click on Item #3, Item #3 details show up as they are supposed to however, the item list gets refreshed and puts in the first two records again. How do I stop this from happening?

Very interesting indeed. (at least from my perspective) :D


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 5:47 pm 
Offline
Site Admin

Joined: Thu Apr 29, 2004 10:32 pm
Posts: 386
I have no idea how you are managing your paging.
You should use LIMIT to get the relevant pages.

Each page needs to "know" which page it is. You do this by passing a variable from page to page with the navigation.

http://www.mydomain.com/index.php?Page=1

inside index.php your query should look like :

Code:
$Query="SELECT * FROM MyTABLE WHERE.....";
$Query .= " LIMIT " . ($page-1)*$NumberOfItemsToShow . ",$NumberOfItemsToShow";

_________________
Sincerely

berber

Visit the Weber Sites Today,
To see where PHP might take you tomorrow.
PHP code examples : http://www.weberdev.com
PHP & MySQL Forums : http://www.weberforums.com/
Learn PHP Playing Trivia http://www.webertrivia.com
Search for PHP Code Examples http://www.php-code-search.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 5:53 pm 
Offline

Joined: Thu May 20, 2004 6:29 pm
Posts: 12
thanks...not sure what you are refering to unfortunately here either. I am not switching pages. I have everything working off of a single page so far. So my links in the first table display record details in the second table without changing to a new page.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 8:34 pm 
Offline
Site Admin

Joined: Thu Apr 29, 2004 10:32 pm
Posts: 386
Send me a link to your page.

_________________
Sincerely

berber

Visit the Weber Sites Today,
To see where PHP might take you tomorrow.
PHP code examples : http://www.weberdev.com
PHP & MySQL Forums : http://www.weberforums.com/
Learn PHP Playing Trivia http://www.webertrivia.com
Search for PHP Code Examples http://www.php-code-search.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 8:36 pm 
Offline

Joined: Thu May 20, 2004 6:29 pm
Posts: 12
sry...don't have it posted up on the net anywhere. I am serving the pages locally.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 6:41 pm 
Offline

Joined: Thu May 20, 2004 6:29 pm
Posts: 12
berber, i am up and running on the net now to show you what i am refering to. Here is the link:

http://www.thesportslair.com/MemberRides.php

On the upper left hand side is the menu. If you click on the double arrows to the right it will take you to the next grouping. If you select the user that shows up there, the list will go back to the begining. That's where I'm lost. Shouldn't it stay at the record, or should I say how do I keep it to stay on that record since it will become a nuisance once more people are added?

Thanks for your help.

Jim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 8:55 pm 
Offline

Joined: Thu May 20, 2004 6:29 pm
Posts: 12
i see what you mean now. I have changed some things around. How much should be restricted out but yet still allow access to the pages?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 9:05 pm 
Offline
Site Admin

Joined: Thu Apr 29, 2004 10:32 pm
Posts: 386
looks like you are not passing all of the needed variabled to the page when you click on the user.

I'm not sure why you chose to build the page the way you did with JavaScript and sessions.

IMHO, you should try to think of a way to simplify the navigation and the maintenance.

use a search and/or drop down menues to navigate to the page you need.

_________________
Sincerely

berber

Visit the Weber Sites Today,
To see where PHP might take you tomorrow.
PHP code examples : http://www.weberdev.com
PHP & MySQL Forums : http://www.weberforums.com/
Learn PHP Playing Trivia http://www.webertrivia.com
Search for PHP Code Examples http://www.php-code-search.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 9:11 pm 
Offline

Joined: Thu May 20, 2004 6:29 pm
Posts: 12
well....like i said.....i'm extremely new to the mysql and PHP. I was using Adobe GoLive to lay out the page and everytime I would make a change, GoLive would kill my code. So, I had to lay out the page and then go into the source code screen to do some coding for the tables. Pretty much its just one of them situations where ya don't know what your doing so you let the Development Tool (in this case GoLive) guide you.

I thought it was pretty good for a first attempt. :?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: