The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Okay, looking for something pretty straightforward, but I want to approach it in a logical direction.

I want a simple output table that will display the columns returned by the query, with each header being clickable to resort the table by that header. I would also like pagination, preferably with variable items per page.

So I know the basics of doing the pagination, and am already doing it on other pages. I can figure out how to dynamically adjust the search query to handle the resorting via the headers. I can do it all piece by piece, and could pretty easily do it all for any given search query.

The issue here is I would love to abstract this so that I can just pass some information to a page/function and have it generate what I need for different queries.

What is the best suggestions for how do do this? Make single page for all of them that calls a function to return the page content?

I am running into an issue with having so many variables here:
base sql statement
sort field
lines per page
header names
mysql fieldnames associated with each header
page title information

How do I get all those variable passed to the display page? I can't post without a form, can I? I can't trust that sessions will be available as the user may have cookies turned off (I am using cookie only sessions elsewhere on the site). I sure don't want to stick a search query in full into the url...

How do I get all those variable passed to the display page? I can't post without a form, can I? I can't trust that sessions will be available as the user may have cookies turned off (I am using cookie only sessions elsewhere on the site). I sure don't want to stick a search query in full into the url...

You definitely should use the URL to transfer application state in this case. If you put state at the server (Eg. use session), your user won't be able to use the back/next buttons, or bookmark the view.

I have a weird mental block when it comes to using pre-existing software. Like when making my wifes site (in sig) I looked at several options for CMS, but they all baffled me (and didn't seem flexible enough), so I built it from scratch in about a month. It is light on navigation right now so I am fleshing that out.

Anyway, on Pear I am stuck at installation. I am on a shared server running apache (unix), my home systems are all windows xp. I have no login information to access the site through a telnet prompt, and the supposedly easy installation instructions for ftp completely baffle me.

But it just starts off with all sorts of requirements that I don't even know what they are much less if I have them.

I doubt I have any of it since all my development has been by transfering files to the live server and testing there. (with different filenames and then renaming for 'launch') I can't seem to get my local server running right. Something in the settings always leads me to broken links and inability to connect to mysql.

It is probably the result of my purely self taught status. I seem to jump into languages and learn the advanced content really quick, but then actually have trouble with not knowing the proper definitions of everything which causes me to falter when trying to read documentation on the expert level content. I mean I can build a pretty decent CMS from scratch in a month but can't figure out how to get a local server working or install pear? That just seems backwards to me. Most of it is I don't know where to start.

Funny thing is I have already written most of the code for the pagination/sort order dynamic page. Annoying that I can write this stuff from scratch faster than I can understand what is handed to me. I really need to get my local server running though.

Site is becoming more popular every week and soon I will be pissing off way too many people when I break it while updating, heh. The adrenaline rush when you miss a semicolon in an include that breaks EVERY page on your domain is sure intense though!!

You don't need to use the PEAR installer to get PEAR libraries. You can manually download the files, and untar them. You'll have to figure out dependencies on your own though (Not that hard, since they are listed in the description of each package).