This is the code I am having trouble with:
<?php
mysql_connect('localhost', 'username', 'password') or die(mysql_error());
mysql_select_db('database') or die(mysql_error());
$posts = mysql_query("SELECT * FROM `wp_DevBlogposts` ORDER BY `wp_DevBlogposts`.`post_date` DESC LIMIT 2") or die(mysql_error());
while($row = mysql_fetch_array($posts)){
$post_name = $row['post_title']; // Post Name/Title
$post_content = $row['post_content']; // Post Content
$url = $row['guid']; // Post URL
}
?>
<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<td>
<b><a href='$url'><?php echo $post_name; ?></a></b>
</td>
<td>
<b><?php echo $post_content; ?></b>
</td>
</tr>
</table>
<br />
</body>
</html>
This code is completely valid, it is constantly spitting up this error:
Access denied for user 'username'@'localhost' to database 'database_database'
The problem is that I can connect to all of the other tables but this one keeps giving me that error. I don't know why I would be able to connect to all the other tables but this one. Thanks for helping!