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
RedBeanPHP loading beans 'id' not found
-
01-10-2022 - |
Question
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?
Solution
OTHER TIPS
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow