; 1001
> >>> 998
> >>> 999
> >>>
> >>> I want it to order like this:
> >>>
> >>> 998
> >>> 999
> >>> 1000
> >>> 1001
>
>
> _
>
> From: Ashley Sheridan [mailto:a..
gt;>> 999
>>> 1000
>>> 1001
_
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Tuesday, January 19, 2010 4:40 PM
To: Daevid Vincent
Cc: 'PHP-General'
Subject: RE: [PHP] order by ASC
On Tue, 2010-01-19 at 16:16 -0800, Daevid Vincent wrote:
gt; in mysql), you could use PHP's sort as well...
>
> http://php.net/manual/en/function.natsort.php
>
> > -Original Message-
> > From: Robert Cummings [mailto:rob...@interjinn.com]
> > Sent: Saturday, January 16, 2010 9:37 PM
> > To: John Taylor-Jo
t.php
> -Original Message-
> From: Robert Cummings [mailto:rob...@interjinn.com]
> Sent: Saturday, January 16, 2010 9:37 PM
> To: John Taylor-Johnston
> Cc: PHP-General
> Subject: Re: [PHP] order by ASC
>
> John Taylor-Johnston wrote:
> > Did some googl
John Taylor-Johnston wrote:
Did some googling. This worked:
ORDER BY CAST(`rollnumber` AS SIGNED)
What is the difference? My problem in the meanwhile must be my version
of MySQL?
You could have skipped quotes altogether. The difference is that you are
referencing a field name, not a string v
Did some googling. This worked:
ORDER BY CAST(`rollnumber` AS SIGNED)
What is the difference? My problem in the meanwhile must be my version
of MySQL?
John Taylor-Johnston wrote:
It hates me:
SELECT * FROM ... WHERE `type` IN ('Member', 'Affiliated', 'Life
Member') ORDER BY CAST(rollnumber
It hates me:
SELECT * FROM ... WHERE `type` IN ('Member', 'Affiliated', 'Life
Member') ORDER BY CAST(rollnumber AS int)
SELECT * FROM ... WHERE `type` IN ('Member', 'Affiliated', 'Life
Member') ORDER BY CAST(`rollnumber` AS int)
SELECT * FROM ... WHERE `type` IN ('Member', 'Affiliated', 'Life
John Taylor-Johnston wrote:
Ok, I think this is a MySQl question. Take pity on me?
$sql = "SELECT * FROM $db.`mailinglist` WHERE `type` IN ('Member',
'Affiliated', 'Life Member') ORDER BY `rollnumber` ASC";
rollnumber is a varchar(50). I need it to be a text field. ASC does not
order the way
8 matches
Mail list logo