Help with mysql data sorting using php

Help with mysql data sorting using php

am 17.05.2010 08:54:49 von Nagendra Prasad

--000325565372a261e70486c4b485
Content-Type: text/plain; charset=ISO-8859-1

Hi All,

I have a database of MP3's in mysql. The database contains MP3 name, artist,
date, size etc. I need to order the search results in both ascending and
descending order. For example if user wants to see the size of all mp3's in
ASC order he will click on size column and again if he wants to see the
MP3's in DEC order he can click on the size column. Suppose the MP3's are
arranged in ASC order and if he clicks on size column the data should
arrange in DEC order.

Any idea how I should go about it ?

Please help me :)

Best,
Guru.

--000325565372a261e70486c4b485--

Re: Help with mysql data sorting using php

am 17.05.2010 09:17:54 von Nagendra Prasad

--000e0cd1ab1a2fdc9a0486c50771
Content-Type: text/plain; charset=ISO-8859-1

DB is like more then 500MB

and it will grow day by day :)



On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont wrote:

> If the DB is very small use tablesorter plugin of jquery. Otherwise
> custumizable query method.
>
> On 17 May 2010 07:56, "nagendra prasad" wrote:
>
> Hi All,
>
> I have a database of MP3's in mysql. The database contains MP3 name,
> artist,
> date, size etc. I need to order the search results in both ascending and
> descending order. For example if user wants to see the size of all mp3's in
> ASC order he will click on size column and again if he wants to see the
> MP3's in DEC order he can click on the size column. Suppose the MP3's are
> arranged in ASC order and if he clicks on size column the data should
> arrange in DEC order.
>
> Any idea how I should go about it ?
>
> Please help me :)
>
> Best,
> Guru.
>
>

--000e0cd1ab1a2fdc9a0486c50771--

Re: Help with mysql data sorting using php

am 17.05.2010 09:27:29 von Artur Ejsmont

--001485ea3c9e4500d70486c5289b
Content-Type: text/plain; charset=ISO-8859-1

Hehe. Then a method: ) just make a query builder method like 'findSongs'
with all the params ( optional or mandatory ) like page, limit, sortby,
filters etc. then inside build SQL based on args. Just be careful - SQL
injection is your enemy here. From app pass all the args from get/ post and
that's it. Good luck.

On 17 May 2010 08:18, "nagendra prasad" wrote:

DB is like more then 500MB

and it will grow day by day :)





On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont
wrote:
>
> If the DB i...

--001485ea3c9e4500d70486c5289b--

Re: Help with mysql data sorting using php

am 17.05.2010 09:30:58 von Nagendra Prasad

--000e0cd13a38f0d5960486c53505
Content-Type: text/plain; charset=ISO-8859-1

Hi Artur,

I am a beginner to this stuff. So, If you or anyone can give me some example
codes or may be some links for my reference that would be a great help.

Best,
Guru.

On Mon, May 17, 2010 at 12:57 PM, Artur Ejsmont wrote:

> Hehe. Then a method: ) just make a query builder method like 'findSongs'
> with all the params ( optional or mandatory ) like page, limit, sortby,
> filters etc. then inside build SQL based on args. Just be careful - SQL
> injection is your enemy here. From app pass all the args from get/ post and
> that's it. Good luck.
>
> On 17 May 2010 08:18, "nagendra prasad" wrote:
>
> DB is like more then 500MB
>
> and it will grow day by day :)
>
>
>
>
>
> On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont
> wrote:
> >
> > If the DB i...
>
>

--000e0cd13a38f0d5960486c53505--

Re: Help with mysql data sorting using php

am 17.05.2010 11:18:56 von Kesavan Rengarajan

--0016369c8a3ae247210486c6b698
Content-Type: text/plain; charset=ISO-8859-1

take a look at this:
http://datatables.net/examples/data_sources/server_side.html

On Mon, May 17, 2010 at 5:30 PM, nagendra prasad
wrote:

> Hi Artur,
>
> I am a beginner to this stuff. So, If you or anyone can give me some
> example
> codes or may be some links for my reference that would be a great help.
>
> Best,
> Guru.
>
> On Mon, May 17, 2010 at 12:57 PM, Artur Ejsmont > >wrote:
>
> > Hehe. Then a method: ) just make a query builder method like 'findSongs'
> > with all the params ( optional or mandatory ) like page, limit, sortby,
> > filters etc. then inside build SQL based on args. Just be careful - SQL
> > injection is your enemy here. From app pass all the args from get/ post
> and
> > that's it. Good luck.
> >
> > On 17 May 2010 08:18, "nagendra prasad"
> wrote:
> >
> > DB is like more then 500MB
> >
> > and it will grow day by day :)
> >
> >
> >
> >
> >
> > On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont > >
> > wrote:
> > >
> > > If the DB i...
> >
> >
>

--0016369c8a3ae247210486c6b698--