I have code select database and output false.
but the usname and pasword my entry is true on database. and i used wamp server 64b. apache:2.49, php: 5.5.1.2. i open extension on php.ini
extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
public static function getByNamePass( $username, $password ) {
$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );
$sql = "SELECT * FROM district_account WHERE username = :username AND password = :password";
$st = $conn->prepare( $sql );
$st->bindValue( ":username", $username, PDO::PARAM_STR);
$st->bindValue( ":password", $password, PDO::PARAM_STR );
$st->execute();
$row = $st->fetch();
$conn = null;
if ( $row ) return new District_Account( $row );
}