# \[php\] mysql\_query question

**URL:** <https://forum.kirupa.com/t/php-mysql-query-question/77515>\
**Category:** programming\
**Created:** [January 27, 2005, 6:50pm UTC](https://forum.kirupa.com/t/php-mysql-query-question/77515 "2005-01-27T18:50:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thinker2501](https://avatars.discourse-cdn.com/v4/letter/t/e0b2c6/32.png) [@Thinker2501](https://forum.kirupa.com/u/Thinker2501)\
**Post date:** [January 27, 2005, 6:50pm UTC](https://forum.kirupa.com/t/php-mysql-query-question/77515/1 "2005-01-27T18:50:32Z")

</div>

I have a DB with two tables, ‘listing’ and ‘brokers’. I have it returning rows from listing in a loop and displaying them correctly and all, the row is stored in the variable $result. I want to take $result\_ar[‘lastname’] and use it to such the column ‘lastname’ in ‘brokers’ and return the row when it finds the match. How would I do that. I’ve been working on this for a while now with no results.
