Custom list order


Posted on 16th Feb 2014 07:03 pm by admin

Hi there,

I have checked this tutorial and it's great till the point where I want to display my data by a variable.

Did you know?Explore Trending and Topic pages for more stories like this.
Let's say that I have in my table these fields:
- id
- name
- usort
- category

I want to display the information by category. But then, when I use the script described in the tutorial, it does not work properly as it changes the position in the table by +/-1, not with the row I want it to be changed with. Ultimately it will work when it goes up/down the appropriate row.

I guess there should be a way of fixing that by swapping the usort number, but I have to admit that my skills do not allow me to do that.

Does anyone have an idea how I could do what I would like to do?
No comments posted yet

Your Answer:

Login to answer
51 Like 31 Dislike
Previous forums Next forums
Other forums

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u

making web pages for accounts
Hello, I would like to make pages for accounts on my website im making (its not a real website..im j

Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex

preg-match with a string and numbers
Hi, I can't get the expression to work for my preg_match, what I'd like is for it to match the strin

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

How could I combine these arrays??
Hello.. I'm trying to figure out a way to combine these first two arrays to get the last array..

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash