sql - how to search for an id from a group of id using mysql? -


in table have feild user_ids. user_ids feilds containeing values 12,45,78,95,21,78,98

what need need mysql query search specific id(for ex:45) in feild.

i used like operator not working expected. ex: when search 5 return tru, id 5 not in list.

i know there default function available in mysql.

could pls me...

my query.

select * `friendslist` `users_id` '%'.$id.'%'; 

nb: dont know whether question meets standard,pls dont down vote. pls me....

this works:

select * friendslist find_in_set( $id, users_id ) <> 0 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -