Linked backend to frontend and fixed basic formatting in few files

This commit is contained in:
2021-12-28 21:22:32 +00:00
parent 9c4e487b11
commit 97718c7aee
3 changed files with 41 additions and 4 deletions
+5 -2
View File
@@ -1,16 +1,19 @@
<?php
namespace api;
use PDO;
require_once "./config.php";
/**
* Project Data Class
* Define all functions which either get, update, create or delete timeline data
*/
class ProjectData
class projectData
{
function getProjectData()
{
$conn = dbConn();
$stmt = $conn->prepare("SELECT title, information, imgLocation, projectLink, githubLink FROM projects;");
$stmt = $conn->prepare("SELECT title, isMainProject, information, imgLocation, projectLink, githubLink FROM projects order by date LIMIT 4;");
$stmt->execute();
// set the resulting array to associative