PHP mysqli不会将数据插入表中

时间:2015-02-12 12:39:36

标签: php mysqli prepared-statement

我是新手在PHP中使用mysqli_stmt语句。无论我尝试什么,我都无法将数据插入到我的表中。我有2个表,一个,我可以插入数据,但这个不起作用

if ($new_profile_query = mysqli_prepare($db, 
       "INSERT INTO profile (
             uid, 
             first_name, 
             last_name, 
             biography, 
             interests, 
             date_of_birth) VALUES (
              ?, 
              ?, 
              ?, 
              ?, 
              ?, 
              ?)")) {
//VALUES ('$user_numberr', '$fname', '$lname', '$biography', '$interests', '$dob')";
mysqli_stmt_bind_param($new_profile_query, 
     "issbbs", 
      $user_numberr, 
      $fname, 
      $lname, 
      $biography, 
      $interests, 
      $dob);
   mysqli_stmt_execute($new_profile_query);
   mysqli_stmt_close($new_profile_query);
}

0 个答案:

没有答案