$dbc is returning false. Your query has an error in it:
SELECT users.*, profile.*
FROM users
INNER JOIN contact_info
ON contact_info.user_id = users.user_id
WHERE users.user_id=3");
If you want to learn more about SQL, Check out this SQL Certification by Intellipaat.
For more information visit :