-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectLast.php
More file actions
65 lines (55 loc) · 1.51 KB
/
selectLast.php
File metadata and controls
65 lines (55 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
$hote = '127.0.0.1'; //server
$login = 'root';
$pass = '';
$namedb='tasks';
// عرض بيانات اخر عمود تمت اضافته
$pdo = new PDO("mysql:host=$hote;dbname=$namedb", $login, $pass);
$stmt = $pdo->query("SELECT * from arm order by id desc limit 1");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo '<table border="1" >'."\n";
foreach ( $rows as $row ) {
echo "<tr><td>";
echo($row['m1']);
echo("</td><td>");
echo($row['m2']);
echo("</td><td>");
echo($row['m3']);
echo "<tr><td>";
echo($row['m4']);
echo("</td><td>");
echo($row['m5']);
echo("</td><td>");
echo($row['m6']);
echo("</td><td>");
echo($row['run']);
//echo("</td><td>");
}
echo "</table>\n";
// سيتم عرض بيانات العمود الاخير على شكل جدول
?>
<?php
$hote = '127.0.0.1'; //server
$login = 'root';
$pass = '';
$namedb='tasks';
// عرض بيانات اخر عمود تمت اضافته
$pdo = new PDO("mysql:host=$hote;dbname=$namedb", $login, $pass);
$stmt = $pdo->query("SELECT * from base1 order by id desc limit 1");
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo '<table border="1" >'."\n";
foreach ( $rows as $row ) {
echo "<tr><td>";
echo($row['right1']);
echo("</td><td>");
echo($row['left1']);
echo("</td><td>");
echo($row['forward']);
echo "<tr><td>";
echo($row['stop']);
echo("</td><td>");
echo($row['backward']);
//echo("</td><td>");
}
echo "</table>\n"; // سيتم عرض بيانات العمود الاخير على شكل جدول
?>