我希望在id的时候任何表都有问题。
#MYTABLE publireportaje
idxx - name - last
#THE CODE
R::setup('mysql:host=localhost;dbname=demo','root','xxxxx');
R::freeze(true);
$data = R::find('publireportaje');
echo '<pre>';
print_r($data);
#THE OUTPUT
Notice: Undefined index: id in /home/xxxx/public_html/sandbox/redbean/rb.php on line 4057
Only show the last row我使用Redbean 3.4
发布于 2013-11-04 01:02:38
在RedBeanPHP中,数据库中的每个表都需要有一个名为'id‘的主键列--如果你没有这样的主键列,那么你需要通过一个将主键列重映射到'id’的DB视图来访问这个表。
调用R::find()时出现的错误告诉您该表没有名为‘id’的列...
https://stackoverflow.com/questions/18399522
复制相似问题