Never tried it mysql, but I am led to believe that sorting based on
the result of the mysql SOUNDEX function may produce the results you
want. Other than that, as far as I am aware there is no way to do
this in MySQL without writing a stored procedure to do it.
-Stut
-Stut:
Damn, that produ
On 27/04/06, tedd <[EMAIL PROTECTED]> wrote:
> >On Wed, 2006-04-26 at 16:57, Robert Cummings wrote:
> >> On Wed, 2006-04-26 at 16:51, tedd wrote:
> >> > Hi gang:
> >> >
> >> > I posted the following question to the MySQL list, but the only
> >> > answer I received thus far was a php solution (
On Wed, 2006-04-26 at 21:15, tedd wrote:
> >On Wed, 2006-04-26 at 16:57, Robert Cummings wrote:
> >> On Wed, 2006-04-26 at 16:51, tedd wrote:
> >> > Hi gang:
> >> >
> >> > I posted the following question to the MySQL list, but the only
> >> > answer I received thus far was a php solution (it d
On Wed, 2006-04-26 at 16:57, Robert Cummings wrote:
On Wed, 2006-04-26 at 16:51, tedd wrote:
> Hi gang:
>
> I posted the following question to the MySQL list, but the only
> answer I received thus far was a php solution (it didn't work for
> what I wanted).
>
> As such, maybe if I post a
Going to amend this by saying that whereever the number you need to sort by is
located, you should be able to extract it and do the padding trick even if it's
in the middle of a string.. as long as the format is regular enough.
-TG
= = = Original message = = =
You could try separating out the
Crude, but effective.
ORDER BY length(title) DESC, title
You may also need to make it be:
ORDER BY substring(title, 1, 10), length(title) DESC, title
so you can get them alphabetical to start off with (the first 10
chars) then by the length to hack the "longer" ones with multiple
digits at the
You could try separating out the number an formatting it with SQL and doing an
ORDER BY on the post-processed number. It doesn't have to appear in the SELECT
portion to be able to use it in the ORDER BY section.
SELECT BookName, PageNum, Citation FROM BookQuotes ORDER BY LPAD(PageNum,4,'0');
tedd wrote:
SELECT id, title, url_image_small
FROM $dbtable
WHERE type="type_title"
ORDER BY title
LIMIT $offset, $rowsPerPage"
But, it sorts stuff like this:
Basel Square 1
Basel Square 10
Basel Square 11
Basel Square 2
Basel Square 3
Basel Square 4
Basel Square 5
Basel Square 6
Basel Square 7
On Wed, 2006-04-26 at 16:57, Robert Cummings wrote:
> On Wed, 2006-04-26 at 16:51, tedd wrote:
> > Hi gang:
> >
> > I posted the following question to the MySQL list, but the only
> > answer I received thus far was a php solution (it didn't work for
> > what I wanted).
> >
> > As such, maybe if
On Wed, 2006-04-26 at 16:51, tedd wrote:
> Hi gang:
>
> I posted the following question to the MySQL list, but the only
> answer I received thus far was a php solution (it didn't work for
> what I wanted).
>
> As such, maybe if I post a MySQL question to the PHP group, then I'll
> receive a My
Hi gang:
I posted the following question to the MySQL list, but the only
answer I received thus far was a php solution (it didn't work for
what I wanted).
As such, maybe if I post a MySQL question to the PHP group, then I'll
receive a MySQL answer -- so here goes:
I'm using the following q
11 matches
Mail list logo