# PHP/MySQL assoc array, pulling data

**URL:** <https://forum.kirupa.com/t/php-mysql-assoc-array-pulling-data/139899>\
**Category:** Uncategorized\
**Created:** [March 6, 2005, 8:15pm UTC](https://forum.kirupa.com/t/php-mysql-assoc-array-pulling-data/139899 "2005-03-06T20:15:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobody](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@nobody](https://forum.kirupa.com/u/nobody)\
**Post date:** [March 6, 2005, 8:15pm UTC](https://forum.kirupa.com/t/php-mysql-assoc-array-pulling-data/139899/1 "2005-03-06T20:15:14Z")

</div>

Hey guys,  
more php/mysql help

Normally how I pull data from a single table is by querying the database by pulling all the data from a table where there’s a specific ID or something, so it just seperates out what I need.

However, this time I’m working with a table that it’s impossible to pull data out that way. So if I did it the way I described above I’d have to make about 200 connections to the database, one for each row I’d change. So what I want to know is if there’s a way to pull data from a table by fetching the associative array of all data under a table, and calling the data by identifying two columns of information to get the row I want.

So that probably didn’t make sense.

Right now I pull data like this $myarray[‘column’]

But what I want to do is $myarray[‘column’] WHERE column1 = blah & column2 = blahagain.

So does that all have to be done before querying the database, or is there a way to do it like I’m saying.

Sorry that this is all over the place and confusing.
