Support » Fixing WordPress » Fatar error mysql table

  • hi,

    i have some trouble with my php, it give me php error message like this “Fatal error: Call to a member function get_results() on a non-object…”
    and my code, to print data from my table

    global $wpdb;
    $result = $wpdb->get_results( “SELECT * FROM MyTable “);
    foreach($result as $row)
    {
    echo $row->name.” “.$row->id.””;
    }
    ?>

    any one can solve it, thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatar error mysql table’ is closed to new replies.