You are here: Re: Sorting results of odbc_exec??? « PHP Programming Language « IT news, forums, messages
Re: Sorting results of odbc_exec???

Posted by Erwin Moller on 08/26/05 15:06

Karin Jensen wrote:

> Hi
>
> I am running a PHP program that connects to an Access 2000 database
> via ODBC:
> $results = odbc_exec($connection_id, $sql_select);
>
> Is it possible to sort the contents of $results? I wish to use a
> regex-based sort order that you can't do in Access 2000* SQL with
> "ORDER BY".
>
> Thanks!
>
> Karin
>
> * There is the function rgxValidate by John Nurick, which uses
> VBScript.Regexp to provide a regex fn for Access, but this is slow
> in queries because it creates a RegExp object and compiles the
> regular expression every time it is called.

Hi,

PHP is so friendly, you can write your own comparision-functions, which you
can let PHP call to define how to sort.
:-)

Have a look at usort
http://nl2.php.net/usort

See also uasort(), uksort().

Good luck!

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация