Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected in nanya.php on line 145
Below is the snippet of code where the error is generated.
Code: Select all
<?php
$countSql = "SELECT
COUNT(`id`)
FROM
`users`
WHERE
`users_email` = ?";
$sth = $this->_dbh->prepare($countSql);
$sth->execute(array($this->_username)); // line 145
?>I did a search for this problem one the internet and tried some of the suggested 'solutions' but nothing has worked to solve the issue. Any ideas would be welcome.