I think the problem might lie in:
$wpdbinfo = $wpdb->get_results("SELECT * FROM bo_mytable WHERE id=3");
$wpdb->get_results()
returns an array of objects, yet you are referencing a property on $wpdbinfo
(->nameinfo
). You’ll either want to loop through the $wpdbinfo
array, or if you’re certain you’ll get only a single record (possibly a safe assumption if id
is a primary key), you would instead call your query using $wpdb->get_row()
.