Re: Re[2]: [PHP] Pulling unique data from database into an array

2004-02-02 Thread Matt Matijevich
[snip] while (!$recordSet->EOF) { $arrX = $recordSet->fields['user_id'] => $recordSet->fields['field_value']; $recordSet->MoveNext(); [/snip] while (!$recordSet->EOF) { $arrX[$recordSet->fields['user_id']] = $recordSet->fields['field_value']; $recordSet->MoveNext(); } -- PHP General Mailing List

Re[2]: [PHP] Pulling unique data from database into an array

2004-02-02 Thread Richard Kurth
Hello Jochem, I tried what you suggested and it work just perfect as long as i made the array by hand. But when I try to generate the array using the database I can not get it to work. How would I create the array $arrX from the mysql database. I have tried this but it does not work properly while

Re: [PHP] Pulling unique data from database into an array

2004-02-02 Thread Jochem Maas
// given an array in the form: $arrX = array( '6' => 'English||Spanish' '8' => 'English||Portuguese||Finnish' // ...etc... ); // define a new array & loop thru $arrX like so: $arrTmp = array() foreach ($arrX as $langs) { $arrTmp = array_merge($arrTmp, explode('||',

[PHP] Pulling unique data from database into an array

2004-02-02 Thread Richard Kurth
I am pulling data from a database that list the Language a person speaks and the id number. It is in a format like this. user_idfield_value 6English||Spanish 2English 8English||Portuguese||Finnish 5English||Japanese||German 3

Re: [PHP] Pulling unique data from database

2004-02-01 Thread Adam Bregenzer
On Sun, 2004-02-01 at 21:26, Richard Kurth wrote: > each time it looks at a new record it list all the languages that that > person speaks with a double pipe in between each language. > > What I need to do is find all the unique languages so I can generate a > list of languages that do not have an

RE: [PHP] Pulling unique data from database

2004-02-01 Thread Jonathan Rosenberg
; Sent: Sunday, February 01, 2004 9:27 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Pulling unique data from database > > > I am pulling data from a database that list the Language a person > speaks. It is in a format like this. > > English||Spanish > English >

Re: [PHP] Pulling unique data from database

2004-02-01 Thread Raditha Dissanayake
Hello Richard, Normally the distinct calause in sql serves this purpose but it seems that the way your DB is designed you cannot make use of it. The bad news is that you might have to read all the rows split them by the pipe symbol and insert them into a list manually. ouch! Richard Kurth w

Re: [PHP] Pulling unique data from database

2004-02-01 Thread Jason Wong
On Monday 02 February 2004 10:26, Richard Kurth wrote: > What I need to do is find all the unique languages so I can generate a > list of languages that do not have any repeats in it. so the list above > would be English,Portuguese,Finnish,Japanese,German,Spanish in any > order explode() and arr

[PHP] Pulling unique data from database

2004-02-01 Thread Richard Kurth
I am pulling data from a database that list the Language a person speaks. It is in a format like this. English||Spanish English English||Portuguese||Finnish English||Japanese||German English English German each time it looks at a new record it list all the languages that that person speaks with