I次のコードを持っている:Redbean MySQLの挿入エラー
Array
(
[title] => asdas
[question] => dasdsa
[gender] =>
[age] =>
[description] =>
[imageUrl] =>
[plan_id] => 2
[plan_type] => special
[plan_price] => 199
[specialty_id] => 7
[specialty] => Cardiologist
)
私が専門のため、エラーを取得しています:私はこの問題を解決しようとすると1時間以上を費やし
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] =>
)
を、と私は思いまだそれを修正することができません。
コードがPHPであると仮定すると、文字列をかっこで囲む必要がありますか? 'rb.php'の' 2203'行も表示しますか? – PinkTurtle
は、これは私のparamsある アレイ ( [タイトル] => asdas [質問] => dasdsa [性別] => [年齢] => [説明] => [IMAGEURL] => [ plan_id] => 2 [plan_type] =>特別 [plan_price] => 199 [specialty_id] => 7 [専門] =>心臓内科医 ) –
は、あなたがその正常に動作し専門のparamを削除した場合。 –