2 Replies Latest reply on Jun 27, 2011 2:47 AM by Kumar Pratik

    Trouble with mysql table insert

    Zepse7en

      This is the error i get when i run a test operation on the function

       

      InvocationTargetException:There was an error while invoking the operation. Check your operation inputs or server code and try invoking the operation again.

       

      Reason:
      Notice: Undefined index: theid in /Applications/MAMP/htdocs/PLCreator_Alpha-debug/services/DesignsfinalService.php on line 118

       

      I have tried this code--

       

               $user_login_id = $_SESSION['theid'];
             
               while(isset($_SESSION['theid'])){

               $stmt = mysqli_prepare($this->connection, "INSERT INTO $this->tablename (user_id, rep_id, user_email, formula, design, brand_name_1,                         brand_name_2, product_name, logo, special_notes) VALUES ($user_login_id, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
                   $this->throwExceptionOnError();

       

      ANd this code

            $user_login_id = $_SESSION['theid'];
              
                while(isset($_SESSION['theid'])){

               $stmt = mysqli_prepare($this->connection,  "INSERT INTO $this->tablename (user_id, rep_id, user_email, formula,  design, brand_name_1,                         brand_name_2,  product_name, logo, special_notes) VALUES (?, ?, ?, ?, ?,  ?, ?, ?, ?, ?)  WHERE user_id = '$user_login_id'");
                    $this->throwExceptionOnError();

       

       

      I get different client errors based on which one i choose but the operation errors are the same

       

      Thanks in advance for any input!