sql - MYSQL: search IN string as an array of integers -


i have field named authors varchar storing ids of authors (i know wrong save ids varchar !!) want search in field int, example:

select * table 3 in convert(substring_index(`authorid`,',',-1),unsigned integer) 

where authorid value '3,4,5'.

is possible, how can it?

use find_in_set() mysql function

try this

select find_in_set('3',authorid); 

hope work you.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -