Im suppose to search by name and active users, now the problem is I can search by name, but i dont know why active is givin me a problem.. My coding is like this, what is wrong?

$sqlFilter .= ' AND (username LIKE "%'.$_SESSION.'%" OR active LIKE "%'.$_SESSION.'%" )';

username filter works but the active part does not work...HELP

Thanks

find the actual build query on screen using echo statement. then copy that whole query and run it in phpmyadmin or whatever mysql interface you use. check whether query is working at backend or not.

$sqlFilter .= ' AND (username LIKE "%'.$_SESSION['filter']['filterusername'].'%" OR active LIKE "%'.$_SESSION['filter']['filteractive'].'%" )';

echo $query.$sqlFilter
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.