Php redbean 3.4未定义索引:id
我想要的问题与任何表时,idPhp redbean 3.4未定义索引:id,php,redbean,Php,Redbean,我想要的问题与任何表时,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
#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
#MYTABLE publireportaje
idxx-姓名-姓氏
#代码
R::setup('mysql:host=localhost;dbname=demo','root','xxxxx');
R::冻结(真);
$data=R::find('publireportaje');
回声';
打印(数据);
#输出
注意:第4057行的/home/xxxx/public_html/sandbox/redbean/rb.php中未定义的索引:id
只显示最后一行
我在RedBeanPHP中使用了Redbean 3.4,数据库中的每个表都需要有一个名为“id”的主键列——如果没有,则需要通过将主键列重新映射为“id”的数据库视图访问该表
调用
R::find()时出现的错误
告诉您该表没有名为“id”的列。…在RedBeanPHP中,数据库中的每个表都需要名为“id”的主键列-如果没有,则需要通过将主键列重新映射为“id”的DB视图访问该表
调用R::find()
时出现的错误告诉您,表中没有名为“id”的列。可能存在重复项:在那里您还可以找到我的答案。希望这会有所帮助。:)可能的重复:在那里你也可以找到我的答案。希望这会有所帮助。:)