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

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

Help with setcookie()
Merry Xmas to those on this foruum
Older guy here with some experience but not allot so please be

PHP login form help (Done Most of It)
Hi i am having a problem, when i try logging in it is always saying "Invalid Login" im not

Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like

Ball movement
I want to move a ball from one point to another and it should hit a group of balls at the other end

UDS 4.0 Datatype issue
UDS 4.0.322 -- connecting to NI Labview 9.0

When using connection method: Cache with live

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