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.

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

Hyperlink in PHP to MySQL record
Hello,

I am having trouble as i am new to php. I have connected to the database and I have di

Nested (echoed) php running wrong script
Got a problem with a php website I'm creating.

In a nutshell, the first page is entirely html

script and html conflict in trying to create a header.
I have an error is occurring because of an html webpage with a "php require" at the top of

insert/update functions for mysql, what do you think?
I am working on two really simple functions that automatically generate (and execute) insert and upd

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

Auto fill in input value based on User_ID
Hello,

I'm looking form some input on the following problem.

User loads page ->

need help in dynamic select menu in php
hi i have created a dynamic select menu using php. i have a problem in that which is when the user s

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