# WTF? mysql\_query returns only one row

**URL:** <https://forum.kirupa.com/t/wtf-mysql-query-returns-only-one-row/278168>\
**Category:** Uncategorized\
**Created:** [December 23, 2008, 11:09am UTC](https://forum.kirupa.com/t/wtf-mysql-query-returns-only-one-row/278168 "2008-12-23T11:09:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icy\_Penguin](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@Icy\_Penguin](https://forum.kirupa.com/u/Icy_Penguin)\
**Post date:** [December 23, 2008, 11:09am UTC](https://forum.kirupa.com/t/wtf-mysql-query-returns-only-one-row/278168/1 "2008-12-23T11:09:03Z")

</div>

Holy crap am I frustrated.

```auto

$smash_my_face_in = mysql_query("SELECT id FROM table_with_thousands_of_records");
print_r(mysql_fetch_array($smash_my_face_in));

```

returns:

```auto

Array([0] => 1[id] => 1)

```

All the queries that I have in every single other part of my project work fine and return more than one row.

Any NEW query I try to fetch now returns only one row, regardless of the table.

ie:

```auto

print_r(mysql_fetch_array(mysql_query("SELECT id FROM posts")));

```

returns:

```auto

Array([0] => 1[id] => 1)

```

But

```auto

print_r(mysql_fetch_array(mysql_query("SELECT id FROM books WHERE user='$id' AND region='$region' AND matches IN($matches))));

```

generates a list of hundreds of records.

Why is there no smiley that suits my rage/frustration/anger/willingness to slaughter mankind?
