baglan.php
try{
$host='localhost';
$vtadi='database';
$kullanici='root';
$sifre='12345678';
$vt=new PDO("mysql:host=$host;dbname=$vtadi;charset=UTF8","$kullanici",$sifre);
}
catch(PDOException $e){
print $e->getMessage();
}
?>
index.php
include("baglan.php");
$sorgu=$vt->prepare('SELECT* FROM datatable INNER JOIN cardtable ON datatable.CARDCODETABLE=cardtable.CARDCODE OR datatable.CARDCODETABLE=cardtable.CARDCODE ORDER BY idtable DESC limit 0,360');
$sorgu->execute();
$personellist=$sorgu-> fetchAll(PDO::FETCH_OBJ);
?>
foreach($personellist as $person){
?>
= $person->IDTABLE ?>
= $person->COMPANYTABLE ?>
= $person->CARDCODETABLE ?>
= $person->LOCATIONTABLE ?>
= $person->VALUE1 ?>
= $person->VALUE2 ?>
= $person->VALUE3 ?>
= $person->VALUE4 ?>
= $person->TIME ?>