私はerror_reporting
ずっとそれを何度も見てきたので、間違った値を呼び出しているか、正しいものを宣言していない可能性があると思います。私が困惑しているので、飛び込んでコードの何がどうなっているのか、なぜまだエラー「オブジェクト以外のメンバー関数 bind_param() を呼び出す」を教えてくれる人なら誰でも:
$db=new mySQLi($host,$dbhuser,$dbhpwd,$dbh);
$insert_stmt = $db->stmt_init();
$insert_stmt = $db->prepare("INSERT INTO food (id,timestamp,userid,tagline,group,location,event_date,event_time,image,type) VALUES(NULL,NOW(),?,?,?,?,?,?,?,?)");
$insert_stmt->bind_param("issssssi",$_SESSION['id'],$tagline,$organizer,$location,$event_date,$event_time,$image_name,$food_id);
$insert_stmt->execute();
userid は、保存された Cookie から取得した整数です。
$tagline、$organizer、$location は、最大 140 文字のテキストです。
$event_date = $event_date= substr(date('Y'),0,2).$year."-".$month."-".$day; $event_time= date("H:i:s", strtotime($hour.":".$minute.$period)); - これらの変数はすべて、テキストとして 2 桁の数字としてユーザーが入力したものです
$image_name はテキスト、ファイル パスです
type は 1 ~ 29 の整数です。
? の結果の例を次に示します。データベースの値: 38、テスト、テスト、テスト、2013 年 2 月 20 日、14:15:00、Halloween_Beer_2.jpg、7
これは、food というテーブルの mysql でのセットアップのスクリーン ショットです。