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

array_diff weirdness
I'm using the following bit of code

$diff = array_diff($pids, $pidlist);
$diff = array_va

Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:

What is SAP Avatar ?
Hi All,

This G.Satish , my boss asked me to explore on SAP Avatar. I searced in internet

php global variable
how can we create global variable so we can use its value in any form.. Please give example to

Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

Bandwidth monitoring?
Hi guys,

I need a little information I have written a php app and I occurred to that I need

utl_file open error
i have file in the unix path

Path /popdev01/pop/popdevb/tfi/

File name

reorder sql query
ok so i have this very simple code:
Code: $query = "SELECT search_keywords, COUNT(search_key

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