Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <hr /><h3>Event List v0.1 by djphil (CC-BY-NC-SA 4.0)</h3><hr />
- <?php
- /* Event List v0.1 by djphil (CC-BY-NC-SA 4.0) */
- ini_set('display_errors', 1);
- error_reporting(E_ALL);
- $dbhost = "localhost";
- $dbuser = "root";
- $dbpass = "***";
- $dbname = "joomla";
- $tbname = "opensim_search_events";
- $db = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
- if ($db->connect_error) {die("Connection failed: " . $db->connect_error);}
- $sql = "SELECT * FROM $tbname";
- $result = $db->query($sql);
- if ($result->num_rows > 0)
- {
- while($row = $result->fetch_assoc())
- {
- $name = $row['name'];
- $description = $row['description'];
- $category = $row['category'];
- $dateutc = $row['dateUTC'];
- $duration = $row["duration"];
- $simname = $row['simname'];
- $parcelname = $row['parcelName'];
- $landingpoint = $row["landingpoint"];
- $mature = $row['mature'];
- $txt = "name: ".$name
- ." description: ".$description
- ." category: ".$category
- ." dateUTC: ".$dateutc
- ." duration: ".$duration
- ." simname: ".$simname
- ." parcelname: ".$parcelname
- ." landingpoint: ".$landingpoint
- ." mature: " .$mature;
- echo $txt."<br />";
- }
- }
- else {echo "0 results";}
- echo "<hr />";
- $db->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement