here is the snippet of the code i'm working with -
//mysqli
$db_conn = mysqli_connect('localhost', 'root', 'XXXX', 'core');
$db = mysqli_select_db($db_conn, 'core');
$result = mysqli_query($db_conn, 'SELECT * FROM customers WHERE email = "juz_acool1@gmail.com"');
$result_rows= mysqli_fetch_assoc($result);
var_dump($result_rows);
//pdo
$dsn = "mysql:host=localhost;dbname=core;";
$u = 'root';
$p = 'XXXX';
$pdo = new PDO($dsn, $u, $p);
var_dump($pdo);
$test = $pdo->exec('show databases;');
var_dump($test);
var_dump($pdo);
$query = $pdo->prepare("SELECT * FROM customers WHERE email = 'juz_acool1@gmail.com'");
var_dump($query);
$r = $query->execute();
var_dump($r);
and here is what i get as the result -
//mysqli
array (size=10)
'id' => string '1' (length=1)
'fullname' => string 'Shalom Sam' (length=10)
'username' => string 'shalom.sam' (length=10)
'email' => string 'juz_acool1@gmail.com' (length=19)
'birthdate' => string '05/25/1986' (length=10)
'gender' => string 'm' (length=1)
'location' => string 'Mumbai, Maharashtra, India' (length=26)
'verified' => string '1' (length=1)
'timezone' => string '5.5' (length=3)
'lastupdatetime' => string '2014-05-02 15:42:35' (length=19)
//pdo
int 0
object(PDO)[4]
object(PDOStatement)[5]
public 'queryString' => string 'SELECT * FROM customers WHERE email = 'juz.cool1@gmail.com'' (length=59)
boolean false
I know all this is a lot to read. But I really am looking to figure where i may be going wrong. Hope someone can help me out here.