Re: Extracting data from Arrays in ISAM table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Step #1: Select name_field FROM the_table;
Step #2:
$arr_all_names = array();
foreach single_result in your result_set{ //you have to translate this into 
php
    $arr_name = explode(',', $single_result['name']); //assuming that you 
are joining names in the field using a comma
    $arr_all_names = $arr_all_names + $arr_name;
}
//remove redundancy
$arr_all_names = array_unique($arr_all_names);
//now sort the array
sort($arr_all_names);
//now all you have to do is to loop through the array to display it on your 
site



-- 
itoctopus - http://www.itoctopus.com
<boclair@xxxxxxxxxxx> wrote in message news:464F7825.6090200@xxxxxxxxxxxxxx
>I have a table with between 100k and 200k rows.  One field, `names`, is
> populated, in each row, with an imploded array of up to 4 names.
>
> I require to create a list of names, without repeats, of all the names
> in `names` field to use in an html form.
>
> Any advise would be appreciated.  I have no ideas on how to start.
>
> Louise
>
>
>
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux