Summary Files Commits Branches @commit @diff @stats
path: root / src / index.php
blob: 7120cd3e1c518bbbc054c8b05e1e1788f8092c6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<p>Hello World!</p>
<?php
	include_once("models/JobOffer.php");

	$jb = new JobOffer("Test", "A test", "TheTest", 11);
	// JobOffer::insertInDB($jb);
	foreach(JobOffer::getAllFromDB() as $key => $obj) {
		echo "{$obj->id} {$obj->title}<br>";
	}
	echo "<br>";

	$gottenjb = JobOffer::getFromDBById(1);
	echo $gottenjb->title;

	$gottenjb->title = "Something even newer";
	echo $gottenjb->title;
	JobOffer::updateFromDB($gottenjb);
	$secgot = JobOffer::getFromDBById(1);
	echo $secgot->title;

	JobOffer::deleteFromDB(3);
?>