PHP & MYSQL sorting

PHP & MYSQL sorting

am 12.04.2010 02:16:08 von Ernie Kemp

------=_NextPart_000_0004_01CAD9B3.D369CC60
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0005_01CAD9B3.D369F370"


------=_NextPart_001_0005_01CAD9B3.D369F370
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit



Simple idea I thought.



I need a webpage that displays a drop down list of number with a checkbox on
the side that when checked will select the database again only in descending
order.

Small database with maybe 100 records.



The user can click the submit button when they have located the correct
number.



The trick is to make the checkbox trigger a new Select statement.



Thanks.
















------=_NextPart_001_0005_01CAD9B3.D369F370
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">



charset=3Dus-ascii">





lang=3DEN-CA
link=3D"#996600" vlink=3D"#666666">
v:src=3D"cid:image001.jpg@01CAD9B1.9D2707A0" v:shapes=3D"_x0000_Mail" =
width=3D0
height=3D0 class=3Dshape style=3D'display:none;width:0;height:0'>



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Simple idea I thought.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>I need a webpage that displays a drop down list of =
number
with a checkbox on the side that when checked will select the database =
again
only in descending order.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Small database with maybe 100 =
 records.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>The user can click the submit button when they have =
located
the correct number.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>The trick is to make the checkbox trigger a new Select
statement.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Thanks.



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'> 



style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'> 



 









------=_NextPart_001_0005_01CAD9B3.D369F370--

------=_NextPart_000_0004_01CAD9B3.D369CC60--

Re: PHP & MYSQL sorting

am 12.04.2010 03:17:37 von kranthi

--001517576cb2452b160483ffeaf9
Content-Type: text/plain; charset=ISO-8859-1

You can use javascript to trigger an onclick function every time a checkbox
is selected.
The onclick function can make an ajax call to a remote php script which can
then make the database query.

--001517576cb2452b160483ffeaf9--

Re: PHP & MYSQL sorting

am 12.04.2010 03:58:16 von Nilesh Govindrajan

On 04/12/10 05:46, Ernie Kemp wrote:
> Simple idea I thought.
>
> I need a webpage that displays a drop down list of number with a
> checkbox on the side that when checked will select the database again
> only in descending order.
>
> Small database with maybe 100 records.
>
> The user can click the submit button when they have located the correct
> number.
>
> The trick is to make the checkbox trigger a new Select statement.
>
> Thanks.
>

Use jquery, trigger an ajax request onclick of that checkbox.

--
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com
मेरा भारत महान !
मम भारत: महत्तम भवतु !

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP & MYSQL sorting

am 12.04.2010 16:18:21 von TedD

At 8:16 PM -0400 4/11/10, Ernie Kemp wrote:
>Simple idea I thought.
>
>I need a webpage that displays a drop down list of number with a
>checkbox on the side that when checked will select the database
>again only in descending order.
>Small database with maybe 100 records.
>
>The user can click the submit button when they have located the
>correct number.
>
>The trick is to make the checkbox trigger a new Select statement.
>
>Thanks.

Ernie:





The javascript getData() will have to launch a php script to get the
data again OR you can simply sort the data yourself using sort().

Here's another idea using jQuery:

http://webbytedd.com/jquery/sortable-table/

Cheers,

tedd


--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: PHP & MYSQL sorting

am 14.04.2010 19:27:22 von Ernie Kemp

Thanks for your thoughts. Ajax is the way to go...


Thanks,
..../Ernie

-----Original Message-----
From: tedd [mailto:tedd.sperling@gmail.com]
Sent: April-12-10 10:18 AM
To: Ernie Kemp; 'PHP General List'
Subject: Re: [PHP] PHP & MYSQL sorting

At 8:16 PM -0400 4/11/10, Ernie Kemp wrote:
>Simple idea I thought.
>
>I need a webpage that displays a drop down list of number with a
>checkbox on the side that when checked will select the database
>again only in descending order.
>Small database with maybe 100 records.
>
>The user can click the submit button when they have located the
>correct number.
>
>The trick is to make the checkbox trigger a new Select statement.
>
>Thanks.

Ernie:





The javascript getData() will have to launch a php script to get the
data again OR you can simply sort the data yourself using sort().

Here's another idea using jQuery:

http://webbytedd.com/jquery/sortable-table/

Cheers,

tedd


--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.801 / Virus Database: 271.1.1/2806 - Release Date: 04/12/10
02:32:00


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php