Guest User

Untitled

a guest
Apr 20th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?php
  2. include('../inc/conn.php');
  3. $conn = mysql_connect($host,$user,$pass);
  4. mysql_select_db($db, $conn) or die(mysql_error());
  5. $result = mysql_query("SELECT * FROM wp_posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY id DESC LIMIT 1") or die(mysql_error());
  6. while ($records = mysql_fetch_assoc($result)) {
  7. echo $records['post_title'] . " " . $records['post_content'] . "<br>";
  8. }
  9. $result2 = mysql_query("SELECT * FROM games_posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY id DESC LIMIT 1") or die(mysql_error());
  10. while ($records2 = mysql_fetch_array($result2)) {
  11. echo "<a href='" . $records2['guild'] . "'> . $records2['post_title'] . "</a>" . $records2['post_content'] . "<br>";
  12. }
  13. $result3 = mysql_query("SELECT * FROM tab_posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY id DESC LIMIT 1") or die(mysql_error());
  14. while ($records3 = mysql_fetch_assoc($result3)) {
  15. echo $records3['post_title'] . " " . $records3['post_content'] . "<br>";
  16.  
  17. }
  18. ?>
Add Comment
Please, Sign In to add comment