Summary Files Commits Branches @commit @diff @stats
path: root / src / index.php
blob: 6478815d685136338befb4073a7e555143a989e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<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;
?>