0

I'm getting empty results when running this query using PDO. The SQL query checks out in Mysql however.

<?php

$stmt = $pdo->prepare('SELECT games_images.imgName 
                       FROM games_images 
                       JOIN product 
                       WHERE games_images.imgName LIKE ? 
                         AND product.id=?  ');
$stmt->execute([$Name, $ID]);
$Exists = $stmt->fetchColumn();
print_r($Exists);

?>
Qirel
  • 25,449
  • 7
  • 45
  • 62
Den.P
  • 11
  • 2

0 Answers0