Good Day,

I am trying to load some data from RedBean from my PHP table:

R::freeze( true );

$idfunctions=1; $function = R::load('functions', $idfunctions); if (!$function->id) { echo "...help bean not found!!.."; }

The table functions has a primary key column called idfunctions. However, the library keeps assuming my id column is "id". Is there anyway I can set it to idfunctions?

有帮助吗?

解决方案

Redbean expects certain schema configurations. One of them is a primary key named id. Please read this page carefully for the others. http://www.redbeanphp.com/schema

其他提示

first of all , u cant change the "id" field. because it is already defined bydefault in "rb.php".

but if you want you can change there in rb.php file.But that is not a good idea to do that.

so better avoid this and follow the red bean schema type.

HAppy coding

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top