Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "pythonspot";
- //function max(){
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql1 = "SELECT MAX(ID) AS ID from vmercusuar where Sistem='Pulau Pongok' and Kondisi='DMP (MW)'";
- $result1 = $conn->query($sql1);
- //$x=1;
- if ($result1->num_rows > 0) {
- // output data of each row
- while($row1 = $result1->fetch_assoc()) {
- $maxi = $row1["ID"];
- echo $maxi;
- }
- }
- $conn->close();
- //}
- //max();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement