PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm trying to get the username out of the user table in accordance to the id in the user table (Which is the same as userid in the blog table). I have the following query so far but I'm not sure how to salvage the username from the users table in order to print it on the page. Could you give me some tips please? Also, is this the best way to do what I'm trying to do?
$query = "SELECT blog.*, user.username FROM blog INNER JOIN user ON blog.userid =
user.id WHERE userid='1' ORDER BY thetimestamp DESC";
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.