mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-20 02:19:34 +05:30
(feat): added fetch quick action link query function and client json dataset
This commit is contained in:
@@ -6,13 +6,6 @@ function fetch_all_records($conn, $table_name) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
//function to fetch a single record of the given table, cloumn and it's value
|
||||
function fetch_a_record($conn, $table_name, $column_name, $column_value) {
|
||||
$sql = "SELECT * FROM $table_name WHERE $column_name = '$column_value'";
|
||||
$result = $conn -> query($sql);
|
||||
return $result;
|
||||
}
|
||||
|
||||
//function to create an array of all unique project years
|
||||
function create_project_years_array($conn) {
|
||||
$sql = "SELECT DISTINCT year FROM projects ORDER BY year DESC";
|
||||
@@ -68,6 +61,16 @@ function fetch_page_title($conn, $page_name) {
|
||||
}
|
||||
}
|
||||
|
||||
//function to fetch page title
|
||||
function fetch_quick_action_link($conn, $action_name) {
|
||||
$sql = "SELECT link FROM quick_actions WHERE name = '$action_name'";
|
||||
$result = $conn -> query($sql);
|
||||
if($result -> num_rows > 0){
|
||||
$row = $result -> fetch_assoc();
|
||||
return $row['link'];
|
||||
}
|
||||
}
|
||||
|
||||
//---functions to fetch search results starts here---
|
||||
//from projects table
|
||||
function fetch_search_results_projects($conn, $keyword) {
|
||||
|
||||
Reference in New Issue
Block a user