01.
<html>
02.
<head>
03.
<title></title>
04.
</head>
05.
<body>
06.
<?php
07.
mysql_connect(
"localhost"
,
"root"
,
"xxx"
)
08.
or
die
(
"Could not connect: "
. mysql_error());
09.
mysql_select_db(
"project"
);
10.
mysql_query(
"SET NAMES 'tis620' "
);
11.
12.
$date
=
"SELECT id_object FROM computer where id_object = '130-09-001-0001-42'"
;
13.
$a1
=
explode
(
"-"
,
$date1
);
14.
$day
=
$a1
[4];
15.
$today
= (
date
(
"y"
)+ 43);
16.
$mage
= (
$today
-
$day
);
17.
echo
" = $mage"
.
"<br>\n"
;
18.
19.
20.
?>
21.
</body>
22.
</html>