I need to filter my query with more than one argument but I can't do this using mysqli_query, instead of mysql_query.
My code works perfectly if I don't use the AND Operator, for example:
$results = mysqli_query($connecDB,"SELECT * FROM table WHERE company='Company1' ORDER BY id DESC");
But if I use the AND Operator:
$results = mysqli_query($connecDB,"SELECT * FROM table WHERE company='Company1' AND company='Company2' ORDER BY id DESC");
The code doesn't work anymore. I search around and it looks like i need Prepared Statements but I can't find a way to make my code work.
Someone know what i'm doing wrong ?