I have this :
$pdo = new PDO('mysql:host=localhost;dbname=mydb', 'user', 'pass');
$max = 10;
$min = 0;
$q = $_GET['q'];
$result = $pdo->prepare("SELECT * FROM fruits WHERE name LIKE ? LIMIT ?, ?");
$result->execute(array('%'.$q.'%', $min, $max));
However it doesn't work (returns nothing) while when I replace LIMIT by LIMIT 0, 10 and remove $min and $max from the array it works. What am I doing wrong? I tried using '0' instead of 0 but it doesn't work either...