Title: Custom SQL
Last modified: August 20, 2016

---

# Custom SQL

 *  Resolved [Michael Matias](https://wordpress.org/support/users/gremory/)
 * (@gremory)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/custom-sql/)
 * Hello, I’m trying to make a custom SQL query in wordpress, I’ve read this page:
 * [http://codex.wordpress.org/Class_Reference/wpdb](http://codex.wordpress.org/Class_Reference/wpdb)
 * But I don’t seem to get any results.
 * The database table I’m trying to access is:
 * wp_evr_attendee
 * Am I doing anything wrong?
 * Thank you for your time.
 *     ```
       $querystr = "
       				SELECT $wpdb->evr_attendee.*
       				FROM $wpdb->evr_attendee
       			 ";
   
       			 $mylink = $wpdb->get_results($querystr, OBJECT);
   
       			 print_r($mylink);
       			 echo $mylink->id;
       ```
   

The topic ‘Custom SQL’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Michael Matias](https://wordpress.org/support/users/gremory/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/custom-sql/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
