[wp-trac] [WordPress Trac] #48664: Fatal error: Uncaught Error: Call to undefined method stdClass::get_results()

WordPress Trac noreply at wordpress.org
Sat Nov 16 07:50:51 UTC 2019


#48664: Fatal error: Uncaught Error: Call to undefined method
stdClass::get_results()
----------------------------+-----------------------------
 Reporter:  noshairwankhan  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 For this Query global $wpdb; $wpdb->mytable = 'wp_locality'; $result_city
 = $wpdb->get_results ( "SELECT DISTINCT city FROM $wpdb->mytable WHERE
 availability_status = 0" );

 foreach( $result_city as $value ) { city; ?>">city; ?>

 https://bradfordremovalservice.com

 This result works fine While fetching this result in ajax it gets
 following error Fatal error: Uncaught Error: Call to undefined method
 stdClass::get_results() in This there any suggestion

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48664>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list