Ich habe den folgenden Code:Redbean MySql Einsatz Fehler
Array
(
[title] => asdas
[question] => dasdsa
[gender] =>
[age] =>
[description] =>
[imageUrl] =>
[plan_id] => 2
[plan_type] => special
[plan_price] => 199
[specialty_id] => 7
[specialty] => Cardiologist
)
Ich erhalte Fehler für Spezialität:
Error
RedBeanPHP\RedException Object
(
[message:protected] => Cannot cast to bean.
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /Applications/XAMPP/xamppfiles/htdocs/site/rb/rb.php
[line:protected] => 2203
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /Applications/XAMPP/xamppfiles/htdocs/site/rb/rb.php
[line] => 2414
[function] => __set
[class] => RedBeanPHP\OODBBean
[type] => ->
[args] => Array
(
[0] => specialty
[1] => asdsad
)
)
[1] => Array
(
[file] => /Applications/XAMPP/xamppfiles/htdocs/site/class/crud.php
[line] => 52
[function] => offsetSet
[class] => RedBeanPHP\OODBBean
[type] => ->
[args] => Array
(
[0] => specialty
[1] => asdsad
)
)
[2] => Array
(
[file] => /Applications/XAMPP/xamppfiles/htdocs/site/validate/question/step2.php
[line] => 37
[function] => insert
[class] => crud
[type] => ->
[args] => Array
(
[0] => question
[1] => Array
(
[title] => asdas
[question] => dasdsa
[gender] =>
[age] =>
[description] =>
[imageUrl] =>
[plan_id] => 2
[plan_type] => special
[plan_price] => 199
[specialty_id] => 7
[specialty] => asdsad
[contributor] => dinesh
[created_by] => 1
[ip_address] => ::1
[user_agent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0
)
)
)
)
[previous:Exception:private] =>
)
ich mehr als 1 Stunde lang versucht, dieses Problem zu beheben, und ich bin immer noch nicht in der Lage, es zu beheben.
Angenommen, Ihr Code ist PHP, müssen Sie String mit Klammern, nicht wahr? Zeigen Sie uns auch die Zeile '2203' von' rb.php'? – PinkTurtle
Das ist mein params Array ( [title] => asdas [Frage] => dasdsa [Geschlecht] => [Alter] => [description] => [imageUrl] => [ plan_id] => 2 [plan_type] => Sonder [plan_price] => 199 [specialty_id] => 7 [Spezialität] => Kardiologe ) –
Wenn Sie die Spezialität param seine ordnungsgemäß funktioniert entfernen. –