错误:查询错误:表'jeanpaulcaruana1bsc5m.tbl_'不存在
PHP
require_once("connection.php");
$connection = connectToMySQL();
$query = "select * from tbl_ members";
$result = mysqli_query($connection, $query)
or die("Error in query: ".mysqli_error($connection));
$data = array();
while ($row = mysqli_fetch_assoc($result)){
$data[] = $row;
}
的Javascript
app.controller('getMembersCtrl', function($scope, $http) {
$http.get('php/showMembers.php').success(function(data){
$scope.members = data;
console.log(data);
})
.error(function(err){
$log.error(err);
});
});
数据库名称:jeanpaulcaruana1bsc5m
表格试图访问tbl_members
答案 0 :(得分:1)
您的查询中存在错误(表格名称中的空格)。
$query = "select * from tbl_members";
答案 1 :(得分:0)
SQL查询
中的“tbl_”和“members”之间有空格