Forum Moderators: coopster

Message Too Old, No Replies

PHP sort script needed

Help needed with script

         

aradjkoe

10:52 am on Jul 8, 2005 (gmt 0)

10+ Year Member



Hello all,

i just registered because a friend told me i could find help here.

What i need is a (simple?) script that sorts a listing view.

I have no experience with scripting and cannot write PHP. So i need an example script with manual (i dont mind paying for the script) or someone who can help me make the script.

Hope someone can help me with the needed information.

[edited by: coopster at 1:11 pm (utc) on July 8, 2005]
[edit reason] removed url per TOS [webmasterworld.com] [/edit]

Angelis

11:17 am on Jul 8, 2005 (gmt 0)

10+ Year Member



Do you have a script that gets data from a database already?

If so the PHP will has mysql_query section with the database variables, you need to add a piece of code to that so it exports the data in a sorted order.

aradjkoe

11:38 am on Jul 8, 2005 (gmt 0)

10+ Year Member



At this moment we have nothing yet. Just a simple table made in html. So i need a msql database first?

coopster

1:16 pm on Jul 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, aradjkoe.

You won't pay here, but you'll learn how to do it yourself [webmasterworld.com] ;)

What Angelis is referring to is that in order to sort the data before displaying it with PHP you need to have the information in some form of structure that lends itself to this action -- either a database or even as simple as a flat text file or an array.

There are client-side options using javascript but with HTML tables of any size you are likely to have memory issues in the browser.

Angelis

1:24 pm on Jul 8, 2005 (gmt 0)

10+ Year Member



Yes you need a mysql database or as Coop said a structured flat file, mysql is easier to use I would imagine as the admin panel you usally get with it is reasonably self explanatory (may take a few hours to get to grips with it).

You need first to check if your hosting provider has mysql installed and that you have access to it, then you need to make a table.

After that I think we can help you write it quite quickly :)