09-21-2011, 08:44 PM | #1 |
Registered User
Join Date: Jul 2011
Posts: 177
|
Not allowing duplicate values to an array
Hi,
How can I prevent duplicate values from getting stored into an array? I am trying to dynamically populate an array with data using the concat() function, but I do not want to allow duplicate selection to be stored in the array. Total noob here. Pls help! Thanks.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
02-29-2012, 02:56 AM | #2 |
Moderator
Join Date: Sep 2011
Location: INDIA
Posts: 250
|
you need to sort the array and then check for duplicates.hope this would work or let me know if not working still
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
11-11-2012, 12:13 AM | #3 |
Registered User
Join Date: Mar 2010
Posts: 40
|
that would be easy if you have ID on every record. So load this on your array:
select distinct(id) from table1 hope that helps.
__________________
Get your To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
03-11-2014, 12:40 AM | #4 |
Registered User
Join Date: Nov 2013
Posts: 92
|
If you unique Id for each record,it wont allow the duplicates..
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|