Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 的未知列错误_Php_Sql - Fatal编程技术网

Php 的未知列错误

Php 的未知列错误,php,sql,Php,Sql,我检查了所有东西,但考虑到我使用PHP不到一个月的时间,我似乎无法弄清这件事的真相。每当我使用此$sql查询时,它都会显示以下错误: //$startrow is variable $startrow = 0; $sql = "SELECT `accounts.full_name`, `image.name` FROM `accounts` LEFT JOIN `image` ON `accounts.person_id` = `image.person_id` WHERE `accoun

我检查了所有东西,但考虑到我使用PHP不到一个月的时间,我似乎无法弄清这件事的真相。每当我使用此$sql查询时,它都会显示以下错误:

//$startrow is variable
$startrow = 0;

$sql = "SELECT `accounts.full_name`, `image.name` FROM `accounts` LEFT JOIN 
`image` ON `accounts.person_id` = `image.person_id` WHERE 
`accounts.image_set` = '$yes' and `accounts.full_name` LIKE '%$q%' 
LIMIT $startrow, 15";

您没有名为
image
的表。您的表格名为
face\u shot

此外,您的背景标记必须围绕名称的每个部分(而不是包括点)。或者您可以完全省略背景标记,除了


我的错是那是另一张桌子。它应该是图像。但是,尽管进行了修复,它仍然不起作用。
SELECT `accounts`.`full_name`, `image`.`name`
FROM `accounts`
LEFT JOIN `image` ON `accounts`.`person_id` = `image`.`person_id`
WHERE `accounts`.`image_set` = '$yes'
AND `accounts`.`full_name` LIKE '%$q%' 
LIMIT $startrow, 15