| 
	
 | 
 Posted by Karin Jensen on 06/13/76 11:25 
Erwin Moller wrote: 
> Karin Jensen wrote: 
>> On Fri, 26 Aug 2005, Alvaro G Vicario wrote: 
>>> I haven't checked the manual but I guess odbc_*() functions do 
>>> now allow custom sorting. However, there're array functions 
>>> that allow such task. So you'd need to load all results into an 
>>> array. I hope the query doesn't return 10,000 records ;-) 
>> 
>> Thanks, Alvaro.  Excuse my ignorance, but what would be the 
>> syntax for loading the results into an array?  I'm not clear how 
>> to deal with odbc results outside the odbc function set. 
> 
> These kind of questions are barely suitable for a ng, not because 
> we don't want to help you, but because this is all nicely 
> described on www.php.net including massive examples. 
> 
> Just go to php.net and start reading about arrays, for-next, 
> while, and databasequeries. 
> Really, it is all there including examples. 
 
Sorry, I think it is partly my fault for not being clear.  I have no 
problem in using or sorting arrays.  My initial question was about 
sorting an ODBC resource. 
 
In the follow up question above, I was wondering if there was a 
quick way of putting ODBC results into array.  From the ODBC 
reference pages, the command "odbc_fetch_into" fetches one result 
row into an array.  Is there a single-line way of getting the ODBC 
results into a multi-dimensional array without looping through the 
rows?  (Note, I am not asking how to do the latter, just whether it 
is necessary!) 
 
Thanks for your patience, 
 
Karin
 
  
Navigation:
[Reply to this message] 
 |