Monday 3 September 2018
Subscribe to:
Post Comments (Atom)
$query = "SELECT * FROM estudos";
if (isset($author)){
$query.=" WHERE author='" . implode ($author) ."'";
print_r ($author);
}
$results=$dbclient->query($query) or die(mysqli_error());
<?php
while($row=mysqli_fetch_array($results))
echo"<tr><td class='name'>$row[name]</td>";
?>
glue
parameter for implode()
. Without that, your $query
would look something like this:SELECT * FROM estudos WHERE author='FooBarBaz'
IN
clause.$query .= " WHERE author IN (" . implode (',', $author) .")";
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment