Search code examples
redbean

RedBeanPHP loading beans 'id' not found


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

  • 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