Reply to Re: Sorting results of odbc_exec???

Your name:

Reply:


Posted by Karin Jensen on 08/26/05 15:53

Erwin Moller wrote:
>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".
>
> 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().

Thanks, Erwin! Sorry to ask more, but the question I was getting at
was whether (in my example) $results would have to be dealt with in
a special way, as it is from an ODBC function.

I am new to PHP and not sure what sort of object $results is or how
to find out what sort of object it is.

PHP clearly knows that $results is ODBC-derived, as you have to
extract data/info from it using special functions (odbc_fetch_row,
odbc_result and so on). I was wondering if this affected how you
would sort it.

Many thanks,

Karin

[Back to original 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

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