Marine1969
IS-IT--Management
I have an ajax script that has an Inner Join and I would like to search on 2 different fields. The issue should be on the execute line however I am not sure how to implement it. The fields I need to search on are from products.name (which is what it currently is) and clientvendors.producer. How do I modify this to pull from both fields?
Code:
$str = $conn->prepare("Select clientvendors.producer, products.name "
. "From products Inner Join clientvendors On clientvendors.idcv = products.idcv "
. "Where products.idclient=2 and name Like :name Order By clientvendors.producer, products.name");
$str->execute([':name' => "%{$_GET['term']}%"]);
$select = $str->fetchAll();