Code: Select all
<?php
SELECT * FROM con_doctrines WHERE common LIKE '%word1%' OR common LIKE '%word1%' OR common LIKE '%word2%'
?>So I tried making the variables which are pulled from another query record ("detailsDoctrine") and then do the query above with the variables:
Code: Select all
<?php
$search1 = "%" . $row_detailsDoctrine['search1'] . "%";
$search2 = "%" . $row_detailsDoctrine['search2'] . "%";
$search3 = "%" . $row_detailsDoctrine['search3'] . "%";
SELECT * FROM con_doctrines WHERE common LIKE $search1 OR common LIKE $search2 OR common LIKE $search3
?>