From f9e2090a1028712ecc6e1b0c71390c821689b414 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 1 Apr 2021 09:43:48 +0300 Subject: Implemented getById from DB and changed some method names --- src/index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/index.php') diff --git a/src/index.php b/src/index.php index ecebcd9..55bba39 100644 --- a/src/index.php +++ b/src/index.php @@ -3,8 +3,12 @@ include_once("models/JobOffer.php"); $jb = new JobOffer("Test", "A test", "TheTest", 11); - JobOffer::insertInDB($jb); - foreach(JobOffer::getAll() as $key => $obj) { + // JobOffer::insertInDB($jb); + foreach(JobOffer::getAllFromDB() as $key => $obj) { echo "{$obj->id} {$obj->title}
"; } + echo "
"; + + $gottenjb = JobOffer::getFromDBById(1); + echo $gottenjb->title; ?> -- cgit v1.3.1-26-gb76a