Fast/Easy way to extract a column from multi-dimensional array?



I'm looking for a way to get all the values from the column of a two
dimensional array.

For example, I have a query on a mysql database that returns 10 rows
from the database, I would like to quickly (read low cpu load) extract
all the IDs from all the rows returned to reuse in another query.

So let's say I use:

$arr = mysqli_fetch_all($result, MYSQLI_ASSOC);

and $arr looks like:

RecordID, name, last name, title
RecordID, name, last name, title
RecordID, name, last name, title
RecordID, name, last name, title
RecordID, name, last name, title
RecordID, name, last name, title
etc...

I need to get all the 'RecordID' from the results to reuse in other
queries.

Is there a built in PHP function (compiled code) to accomplish this?
I've read the definitions of all the functions related to arrays and if
it exists, I didn't find it.

The site is very busy and CPU cycles count. I'm trying to avoid left
joining three gigantic tables.

.



Relevant Pages

  • Re: Re-Seed in SQL Server
    ... Table1 and then you need to change the foreign key in Table2 to match the ... Make a backup of your database file in case anything goes wrong. ... Create a query based on Table1 and only include the fields RecordID ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Re-Seed in SQL Server
    ... Table1 and then you need to change the foreign key in Table2 to match ... Make a backup of your database file in case anything goes wrong. ... Change the query to an Update query. ... Under OldRecordID where it says Update To, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Re-Seed in SQL Server
    ... Table1 and then you need to change the foreign key in Table2 to match ... Make a backup of your database file in case anything goes wrong. ... Change the query to an Update query. ... Under OldRecordID where it says Update To, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Re-Seed in SQL Server
    ... Table1 and then you need to change the foreign key in Table2 to match the ... Make a backup of your database file in case anything goes wrong. ... Create a query based on Table1 and only include the fields RecordID ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Populate table with incremental id
    ... create table seq(val int not null); ... slow query) by the following steps: ... recordID and rowID, ... reference to record in the filtered table, and rowID is an incremental ...
    (microsoft.public.sqlserver.server)