I have a meta_title field in the table. meta_title wanted to rename it in the camelcase style to metaTitle but for some reason, when echo $action['metaTitle'] is echo $action['metaTitle'] nothing happens.

For SQL queries, I use ORM redBean php, for sampling I use this query:

 $action = R::findOne(DB::MAIN.DB::TABLE_ACTIONS, 'section = ? AND url = ?', [$section['id'], $model]); 

if you print the query:

 var_dump($action); 

I get the following object:

 object(RedBeanPHP\OODBBean)#19 (10) { ["properties":protected]=> array(4) { ["id"]=> string(1) "1" ["section"]=> string(1) "1" ["url"]=> string(4) "home" ["metaTitle"]=> string(31) "Главная страница" } ["__info":protected]=> array(7) { ["type"]=> string(11) "mainactions" ["sys.id"]=> string(2) "id" ["sys.orig"]=> array(4) { ["id"]=> string(1) "1" ["section"]=> string(1) "1" ["url"]=> string(4) "home" ["metaTitle"]=> string(31) "Главная страница" } ["tainted"]=> bool(false) ["changed"]=> bool(false) ["changelist"]=> array(0) { } ["model"]=> NULL } ["beanHelper":protected]=> object(RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper)#11 (0) { } ["fetchType":protected]=> NULL ["withSql":protected]=> string(0) "" ["withParams":protected]=> array(0) { } ["aliasName":protected]=> NULL ["via":protected]=> NULL ["noLoad":protected]=> bool(false) ["all":protected]=> bool(false) } 

I suppose an incorrect field name or incorrect server settings.

Please tell me what's the matter !?

  • How do you take data from the database? give the code, please. - Alexander Belinsky
  • supplemented the question. - verstala
  • here is the last heading and below - read. Apparently redbean really does not allow the use of capital letters in the field names. - Alexander Belinsky
  • Looks like you're right, do you have any ways to bypass the rules of the ORM? - verstala
  • Unfortunately, I was not able to deal with RedBean. Try to change the tags in the question and reformulate the title and the text so that it is clear that you need help with RedBean, and not with MariaDB (the database itself has nothing to do with it, most likely). - Alexander Belinsky

0