Jump to content

Array inside SELECT


NebuJohn

Recommended Posts

This is my code

 

$array=$_POST [numbers];

 

 
        $result = mysqli_query($con,"SELECT * From profile WHERE code = $array");
        
               while($row = mysqli_fetch_array($result))
               {
                echo $row['id'];
                echo "<br>";
               }
        mysqli_close($con);

 

But I get an error given below:

 

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given.

 

Can anybody help me to get rid of this.

Link to comment
https://forums.phpfreaks.com/topic/280487-array-inside-select/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.