jeudi 31 janvier 2019

PHP PDO SQL Is Not Working Tried Everything

i've been trying to get this to work i rather use this for performance wise then a regular SQL but i am so close to just giving up and use what i know plain queries, but before i do i thought i ask if anyone can help me here first,

if I use $db->query this returns the number of rows in the database, but if i use db-prepare it keeps returning 0 whys this?

<?php 
require_once "core/c.php";

$query = $db->prepare("SELECT * FROM markyg_users");
$query->execute();
$count = $query->num_rows;
echo $count;
?>




Aucun commentaire:

Enregistrer un commentaire