QueryException(42S22)SQLSTATE [42S22]:找不到列:1054未知的“用户名”列

时间:2019-06-23 06:12:07

标签: mysql laravel-5

我的代码: 值未在数据库中更新并得到此错误:

  

(Illuminate \ Database \ QueryException(42S22)SQLSTATE [42S22]:   找不到列:1054“ where子句”中的未知“用户名”列   (SQL:从Index.php中选择count()作为聚合,其中<div align="center"> <input type="text" name="search" id="myInput" class="form-control" onkeyup="searchTable()"/> </div> //Pagination Code $results_per_page = 25; $number_of_results = mysqli_num_rows($sqldata); $number_of_pages = ceil($number_of_results/$results_per_page); if (!isset($_GET['page'])){ $page = 1; }else{ $page = $_GET['page']; } $this_page_first_result = ($page-1)*$results_per_page; $sqlget = "SELECT * FROM programteamtable LIMIT ".$this_page_first_result . ',' . $results_per_page; $sqldata = mysqli_query($dbcon,$sqlget); while ($row= mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) { echo "<tr><td style='width: 150px; border: 1px solid black;'>"; echo $row['dispID']; //More Columns } <script> function searchTable() { var input, filter, found, table, tr, td, i, j; input = document.getElementById("myInput"); filter = input.value.toUpperCase(); table = document.getElementById("programteamtable"); tr = table.getElementsByTagName("tr"); for (i = 0; i < tr.length; i++) { td = tr[i].getElementsByTagName("td"); for (j = 0; j < td.length; j++) { if (td[j].innerHTML.toUpperCase().indexOf(filter) > -1) { found = true; } } if (found) { tr[i].style.display = ""; found = false; } else { tr[i].style.display = "none"; } } } </script> =   anikatabassum))和(“ SQLSTATE [42S22]:找不到列:1054   “ where子句”中的未知列“ username”(SQL:选择count()为   从users聚合,其中username = anikatabassum)users

username

2 个答案:

答案 0 :(得分:0)

尝试一下-[CRIT] [73FD3F70-AEAE-4021-A91B-A8B24830B38E.1] [core] Plugin queue/smtp_forward timed out on hook queue - make sure it calls the callback

答案 1 :(得分:0)

检查数据库,如果表中是否包含username列,如果表中不包含该列,请运行以下命令:php artisan migrate:fresh