I currently have a fulltext search that works. It matches against a item title column in mysql database. Now I would like to include another column to match against. How can that be done properly?
Here's my code. Where it says MATCH, I would like to include the type_1 column as well; like this(type_1.type_1_name).
$get_records = $db->prepare("SELECT items.*, type_1.* FROM items
LEFT JOIN type_1 ON items.type_1 = type_1.type_1_id
WHERE MATCH(items.item_title) AGAINST('$search_query' IN BOOLEAN MODE) ORDER BY items.item_id DESC LIMIT {$limit} OFFSET ".$offset);
$get_records->execute();
$result_records = $get_records->fetchAll(PDO::FETCH_ASSOC);
if(count($result_records) > 0){
foreach($result_records as $row) {
// get results
}
}