New to PHP, trying to create table that order themselves

Hey Guys,

I am new to this forum and started learning PHP and SQL. I recently bought a book and started learning it because I wanted to use it for my website.

My main goal is to create a table with links that can be order by most viewed, best rated etc. (like when you type in a product on ebay and can then sort the results by best match price etc.)

So my question is if this is possible just by using PHP and SQL and how advanced is this concept (can i implement this after reading one book on sql and php?).
An additional question is if it is possible to implement a rating system for the different links in my database and how advanced that concept is. (with rating system i mean a simple ‘like or dislike’ system, and i would hope that my data base can calculate a percentage or likes to dislike.)

Thx all! :slight_smile:

To do this, you would need to have to order the SQL results based on which the user selects, eg: if they select name, you would need to user

ORDER BY name

. To get the various selections, just have a link with a get variable.

Welcome to SitePoint :slight_smile:

As Works says, the brunt of this task lies on SQL’s shoulders; the PHP side of things can be relatively simple; You just need to figure out what you want to be order-able and then make sure your database has the means to do so.