how would i get a random rowcount using PDO? i'm still learning how to use PDO so this is what i tried, but it didn't work because it doesn't randomize the quotes:
$sql = "SELECT COUNT(*) AS rows FROM thquotes;";
try {
$query = $this->_db->prepare($sql);
$query->execute();
**$rowcount = $query->rowCount();
$rand = rand(0,$rowcount-1);**
$sql = "SELECT cQuotes, vAuthor, cArabic, vReference
FROM thquotes
LIMIT $rand, 1";
i was using this code earlier without PDO which worked:
**$rowcount = mysql_result($result, 0, 0);
$rand = rand(0,$rowcount-1);**