forked from DiveshPoudel/mql4-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxyz.php
More file actions
30 lines (25 loc) · 631 Bytes
/
xyz.php
File metadata and controls
30 lines (25 loc) · 631 Bytes
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
<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password, "ticks");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "select date,bid,ask,open from data";
$result = $conn->query($sql);
if($result->num_rows>0)//output data of each row
{
while($row=$result->fetch_assoc())
{
echo "date:" .$row["date"]. "bid:" .$row["bid"]. "ask:" .$row["ask"]. "open:" .$row["open"]. "<br>" ;
}
}
else
{
echo "0 results";
}
$conn->close();
?>