这是我的 SQL - 使用 ReadBeanPHP 查询。
$idItem = $this->route['alias']; //some $_GET value
$product = \R::findMulti('listings, users',
'SELECT listings.*, users.*
RIGHT JOIN listings.id_user = users.id_user
WHERE listings.id = ? AND listings.status = 0', [$idItem]);
这是一个错误,它把我打印出来
Code error Exception
Text error SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JOIN listings.id_user = users.id_user WHERE listings.id = 4 AND lis' at line 2
Where error /opt/lampp/htdocs/sellbuyschool42/vendor/gabordemooij/redbean/RedBeanPHP/Driver/RPDO.php
Line error 194
我按照 ReadBeanPHP 官方网站上的说明做了所有事情https://redbeanphp.com/index.php?p=/finding 我想获得几个所谓的 bean,但出现错误。或者,如果有人知道将两个表与 ReadBeanPHP 结合起来有多容易,那将是可行的。还提供桌子的照片。
慕妹3242003