Link to home
Start Free TrialLog in
Avatar of pamela rizk
pamela rizkFlag for Lebanon

asked on

jquery autocomplete extender

i have  ajquery autocomplete extender , and i need once i seleect a value i need to select max 5 values.how to do this restriction
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

You can do the restriction in your SQL query.  Use 'TOP 5'.  You will probably want to have some kind of ORDER BY OR WHERE clause criteria so you can properly identify what records are the top 5.

SELECT TOP 5 MyField
From MyDatabase
WHERE ...
ORDER BY ...

Open in new window

Or (Oracle)
Select MyField
FROM MyDatabase
WHERE ....
AND ROWNUM <= 5
ORDER BY  ...

Open in new window

Avatar of pamela rizk

ASKER

no i don't want that
Can you please clarify what you do want?  

You said you want the max 5 results.  That is ALL we know.  I've given a solution that will give you the max 5 results.
sure thank you
what i want is that i want when i select a value from autocomplete extender, i need to manage a counter and each time user select a value the counter will be incremented and once it reaches 5 a message will be displayed
ASKER CERTIFIED SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you it solved my issue