| 
	
 | 
 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] 
 |