One of the conditions for my query is that one of table.id should belong to the array $table_arr. Is there a way that will allow me to implement this? An开发者_如何学Cy ideas will be appreciated.
I'm guessing $table_arr
is a PHP array of ints or strings.
<?php
$query = "SELECT * FROM table WHERE id IN (".implode(", ", $table_arr).")";
$result = mysqli_query($mysql, $query);
// etc
精彩评论