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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:01:23+00:00 2026-06-12T17:01:23+00:00

I have the following array that is describing my table header: $aColumns = array(

  • 0

I have the following array that is describing my table header:

$aColumns = array( 'time1.Time', 'time2.Time' , 'time1.id' , 'time1.Signal' , 'v.Name' , 'v.Lastname'  );

I want to insert new values in the time1.id column.

When I process the following code I got my data shown in the first column which is time1.Time and I need it to be in column time1.id why is this happening?

Here is the code:

if ( mysql_num_rows( $rResult ) > 0 )
    {
        $aCols = array_keys( mysql_fetch_assoc( $rResult ) );
        mysql_data_seek($rResult, 0);
        $id= array_search( 'time1.id', $aCols );        
        $value= "NEW_VALUE";

        while ( $aRow = mysql_fetch_row( $rResult ) ) 
        { 
            $aRow[$id] = $value;
            $aOutput['aaData'][] = $aRow; 
        }
    }
  • 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-12T17:01:25+00:00Added an answer on June 12, 2026 at 5:01 pm

    Try using id as the column name instead of time1.id. Usually only the column names are returned as keys in the result array , even if you have specified the table names in the select fields.

    $id= array_search( 'id', $aCols );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

gcc 4.6.2 c89 I have the following 2D array that I want to pass
I have the following multi-dimensional array that I want to sort. I want to
I have the following array of hashes, and want to remove the ones that
I've the following array: $test[$iterator][1][2]['name'] I have a function that needs to get $iterator
I have an array that looks like the following: array = [[1, 5], [4,
I have following array, that I need to operate by hand on bitmaps. const
Lets say that i have the following array : float QuadVertices[4 * 2]; float
I have the following sort descriptors that sort an array of my business objects,
I have the following php code that gets a serialized array from a mysql
Lets say I have an array numbers that contains the following values: int numbers

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.