🔒 Closed Mysql two where conditions

Status
Not open for further replies.

daredavil07

Journeyman
Hello mga bossing, ano po kaya ang mali sa query ko? May search box po kasi ako, tas kailanga ko lang lahat ng results ay status='Active'.

Code:
$query = "SELECT * FROM `firm` WHERE CONCAT(`fname`, `lname`, `age`, `position`) AND (status = 'Active') LIKE '%".$valueToSearch."%'";

Salamat po!
 
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 663
    Views
  • 2
    Participants
Last reply from:
daredavil07

Trending Topics

Online now

Members online
666
Guests online
1,976
Total visitors
2,642

Forum statistics

Threads
2,318,558
Posts
29,196,260
Members
1,180,985
Latest member
VinaySingh2856
Back
Top