I want to use and or in one query in mysql.
How do i do that?
i try this query but it didn't give me the result i want
i did some search some one say put () also didn't work
select * from tbl_staff where db_user='".$_SESSION['username']."' and
db_status!='Done' and db_status!='Cancelled' or db_transfered='$name'
username transfered status
00021 mhmd done
00022 mhmd Running
What you explained right now:-
Select * FROM tbl_staff WHERE db_status!='Done' AND db_status!='Cancelled' AND (db_user='".$_SESSION['username']."' OR db_transfered='$name')