Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Javascript (http://siteownersforums.com/forumdisplay.php?f=24)
-   -   Not allowing duplicate values to an array (http://siteownersforums.com/showthread.php?t=51249)

mjvndhsb 09-21-2011 08:44 PM

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.

Spoint_Vinil 02-29-2012 02:56 AM

you need to sort the array and then check for duplicates.hope this would work or let me know if not working still

jaydeee 11-11-2012 12:13 AM

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.

alligatortek001 03-11-2014 12:40 AM

If you unique Id for each record,it wont allow the duplicates..


All times are GMT -7. The time now is 10:39 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.