mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-20 03:29:35 +05:30
(feat): added profiles to search results
This commit is contained in:
@@ -115,4 +115,20 @@ function fetch_search_results_quickactions($conn, $keyword) {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
//for quick_actions table
|
||||
function fetch_search_results_profiles($conn, $keyword) {
|
||||
$sql = "SELECT * FROM profile WHERE name LIKE '%$keyword%' OR stag LIKE '%$keyword%'";
|
||||
$result = $conn -> query($sql);
|
||||
if($result -> num_rows > 0) {
|
||||
$result = mysqli_fetch_all($result, MYSQLI_ASSOC);
|
||||
foreach ($result as &$element) {
|
||||
$element['tag'] = 'profile';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user