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 8136875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:53:54+00:00 2026-06-06T10:53:54+00:00

I am having an issue with updating records from an array. When I go

  • 0

I am having an issue with updating records from an array. When I go to update I am only getting the first digit. For example if the real value is 58 I am only getting the 5 inserted

Below is my code with further explanation below:

$bidArr = $tmpArr;

foreach($tmpArr as $key => $val)
{
$sqlEp = "select sum(endpoints_c), account_id1_c as id from accounts_cstm as ac join accounts as a on a.id = ac.id_c 
where account_id1_c ='$val' and (status_c IN ('active','llp')) and deleted='0'";
$rowEp = $db->query($sqlEp);
$recordEp = $db->fetch_row($rowEp);

$bidArr[$key]['sold_ep_c'] = $recordEp[0];

//print "<pre>EP";
//print_r($recordEp);

}

foreach($bidArr as $key => $val)
{

$data['sold_ep_c'] = $val['sold_ep_c'];
$db->query_update(TABLE_ACC, $data, "id_c='".$key."'");
print "<pre>EP";
print_r($key);
print_r($data);
}

What is happening is when I uncomment the first print_r I get:

EPArray
(
[0] => 16
[1] => 51067d38

which is right. But if I comment it out and uncomment the second one I get:

51067d38
(
[sold_ep_c] => 1
)

Why is this stripping the first digit?

  • 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-06T10:53:56+00:00Added an answer on June 6, 2026 at 10:53 am

    As per chat…your arrays aren’t initialized.
    $bidArr[$key] = array(); in the first loop!

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

Sidebar

Related Questions

I'm having an issue with updating the database. The app shows the updated value,
I have been having an issue with updating a nullable bool value using TryUpdateModel.
Hi guys I am having issue I have this query: SELECT * FROM useraccount
I am having an issue trying to trigger the test() function when updating the
I'm having an issue updating a RichText box on a SharePoint 2010 list. _batchElement.InnerXml
I am having an issue with updating the contents of an myInfoBox object I
I'm having an issue with the UITableView object updating after load. I have a
I'm having an issue. My textEditBox doesn't seem to be updating when my Addtext
I'm having an issue when I try to update a task model to the
I'm having an issue with updating a highcharts chart when the new data has

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.