php - How to make mysql like and not like fetch strings from a list -
i have following mysql code
select * loans_book the_amount < 500000 , loan_amount_you_require not '%avensis%' or loan_amount_you_require not '%prius%' or loan_amount_you_require not '%porsch%' or
the problem is,if keep adding not likes,they bound add 100 , suspect list grow longer.
i way mysql has not in
can comma separate strings not like
different in need specify column name each time.
is there way possibly go around requirement state column name each time want use not like
?.
you can try using not regexp
this... query should following:
select * loans_book the_amount < 500000 , loan_amount_you_require not regexp 'avensis|prius|porsch';
Comments
Post a Comment