Creating a site to query a database of tables

前端 未结 7 908
后悔当初
后悔当初 2021-01-18 07:45

I have a small problem. I am working with some manual testers who are untrained in programming/database design. Our current process means that these manual testers need to i

7条回答
  •  醉酒成梦
    2021-01-18 08:32

    You should do something like this:

    Form:

    search.php

    ";
    
    // Comma separated
    $words = explode(",",$_POST['words']);
    
    foreach ($words as $word)
    {
    
     $sql = "SELECT COLUMN_NAME FROM ".$database_name.".INFORMATION_SCHEMA.COLUMNS
     WHERE COLUMN_NAME LIKE '%".$word."%'";
    
     $res = mysqli_query($link,$sql);
    
     while ($row = mysqli_fetch_assoc($res))
     {
      print "".$row['COLUMN_NAME']."";
     }
    
    }
    
    print "";
    
    ?>
    

提交回复
热议问题