Wednesday, 10 February 2016

mysql - Array in where clause inside a for loop php

For some reason this query doesn't work



 $query2 = $db->query("SELECT META FROM hh_dia WHERE ID_LINHA = $Hoje->LINHA[$i]");



If I do like this it works.



$t = $Hoje->LINHA[$i];

$query2 = $db->query("SELECT META FROM hh_dia WHERE ID_LINHA = $t");

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...