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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -