Title: Mysql_fetch_array in wordpress
Last modified: August 21, 2016

---

# Mysql_fetch_array in wordpress

 *  [girll](https://wordpress.org/support/users/girll/)
 * (@girll)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/mysql_fetch_array-in-wordpress/)
 * Hi all. I have such a problem. I write:
 *     ```
       $id = $wpdb->get_results("SELECT * FROM wp_posts WHERE post_type='video'");
       		while ($row = mysql_fetch_array($id)){
       		echo "Id = " .$row['id'];
       	}
       ```
   
 * But I get such an error: Warning: mysql_fetch_array() expects parameter 1 to 
   be resource, array given in .
 * How to solve this? Thaks

The topic ‘Mysql_fetch_array in wordpress’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [girll](https://wordpress.org/support/users/girll/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/mysql_fetch_array-in-wordpress/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
