1
I’m having a hard time passing a variable into the IN
in Mysql - PHP - PDO.
The URL looks like this: /PESO=50&IDADE=18,20
Code:
$read->FullRead("SELECT DISTINCT NOME FROM pessoas WHERE PESO =:peso AND IDADE IN (:idade) AND SEXO =:sexo", 'peso='.$_GET['PESO'].'&idade='.$_GET['IDADE'].'&sexo"=MASCULINO');
What is
$read
? What isFullRead
?– Marcelo Shiniti Uchimura
What mistake are you making?
– Wees Smith
Try to take a look at what was done in this example of the OS in English; it seems that the PDO is not very good for parameterized IN clauses, in the query: https://stackoverflow.com/a/14767651/4649737
– Marcelo Shiniti Uchimura
$read and my Object and Fullread and the method I use of this object.
– cristy