Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:51:49+00:00 2026-06-16T10:51:49+00:00

I am receiving this error when posting with update_batch. I have seen other posts

  • 0

I am receiving this error when posting with update_batch. I have seen other posts on this but my line reference is to the DB_active_rec.php file and others were seeing it in their MC. The error doesn’t stop the update_batch from posting and it returns the error for each $rb_items.
enter image description here

Controller:

  public function update_rb(){

    $rb_items = array();
        $rb_id=$this->input->post('id', TRUE);
        $rb_brand=$this->input->post('brand', TRUE);
        $rb_tasted=$this->input->post('tasted', TRUE);
        $rb_rating=$this->input->post('rating', TRUE);
        $rb_comment=$this->input->post('comment', TRUE);

        $i=0;
        foreach($rb_id as $id){
            $rb_items[$i] = array(
                'id'=>$id,
                'brand'=>$rb_brand[$i],
                'rating'=>$rb_rating[$i],
                'comment'=>$rb_comment[$i]
                );
                if(empty($rb_tasted)){
                    $rb_items[$i]['tasted']=0;
                } else if
                (in_array($id,$rb_tasted)){
                $rb_items[$i]['tasted']=1;
                } else{
                    $rb_items[$i]['tasted']=0;
                }                   
            $i++;
        }
        $this->model->update_rb($rb_items);
    }

Model:

    public function update_rb($rb_items){
        $this->rb_db->update_batch('rb_selection',$rb_items,'id');
    }

View:

    <tr>
        <input type="hidden" name="id[]" value="<?php echo $row['id'];?>">
        <input type="hidden" name="brand[]" value="<?php echo $row['brand'];?>">
        <td><?php echo "<p>".$row['brand']."</p>";?></td>
        <td><input type="checkbox" <?php if($row['tasted'] == 1){echo "checked = checked";}?> name="tasted[]" value="<?php echo $row['id'];?>" id="tasted"/></td>
        <td><input type="text" name="rating[]" <?php echo $row['rating'];?>/></td>
        <td><textarea name='comment[]' id='comment' cols="350"><?php echo $row['comment'];?></textarea></td>
    </tr>

Has anyone seen this error or know what I am missing in my code? Thanks for the help!

print_r($rb_items) returns Array ( [0] => Array ( [rb_id] => 192 [brand] => Napa Valley Soda Co [rating] => r0 [comment] => c0 [tasted] => 1 ) [1] => Array ( [rb_id] => 193 [brand] => Natural Brew [rating] => r1 [comment] => c1 [tasted] => 1 ) [2] => Array ( [rb_id] => 194 [brand] => Naturale 90 [rating] => r2 [comment] => c2 [tasted] => 1 ) )
for a view with three brands on it. All of this is posting correctly regardless of the error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:51:51+00:00Added an answer on June 16, 2026 at 10:51 am

    There is an issue with my version of CI which is 2.1.2.
    In the DB_active_rec.php file on line 1407,

    this:
    $not[] = $k.'-'.$v;

    should be:
    $not[] = $k2.'-'.$v2;

    The correct response was found here:
    https://stackoverflow.com/a/12910038/1738895

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am receiving this error: File /DateDbLoop.py, line 33 d.Id % (str(day), str(2840)) ^
I keep on receiving this error: Showing app/views/posts/index.html.haml where line #115 raised: app/views/posts/index.html.haml:115: syntax
I am receiving this error. I have no clue as to why it would
I'm receiving this PHP error while trying to use the Normalizer class, specifically the
I have been receiving this error for a while when using devenv on an
I want to use a combination of this isset(empty($sc)) but am receiving this error
I'm trying to mock MouseButtonEventArgs.GetPosition() with Moq, but I keep receiving this error: System.ArgumentException:
I am receiving this error Warning: include(../config.php) [function.include]: failed to open stream: No such
i am receiving this error when trying to add user location. I have a
When uploading an excel file I am receiving this error, can anyone help me?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.