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()
.
Related Posts:
- Should all plugins be encapsulated in a Class?
- Registering Class methods as hook callbacks
- Get plugin_dir_url() from one level deep within plugin
- How to use classes declared in another plugin?
- How to delete all records from or empty a custom database table?
- dbDelta only creates the last table
- How do I force wp_enqueue_scripts to load at the END of ?
- How do I make my plugin load before the headers are output so I can redirect wordpress?
- Namespaces in WordPress – How do I initiate the main class?
- Is their any way to Extend WPDB class and Overwrite the Default Query Function
- How do I extend one plugin I’m writing with another I’m writing using classes?
- Add code into on a per page/post basis
- Adding an admin page – OOP approach not working
- How to remove/hide action links cluttering under specific plugins’ names
- scheduled event not getting executed
- Using the media uploader in a custom plugin
- Stackoverflow type of badge plugin giving warnings in WordPress 3.5
- Missing argument 2 for wpdb::prepare() Issue
- Change My Basket text in the header of WooCommerce Artificer theme
- ob_end_flush error when using wpdb in plugin
- Trying to get logged-in user data inside php class
- register child class in another plugin
- How to send “Location” header on plugin form submit event?
- Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages
- Check if a class exists within a method
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- post_content getting cut off on blank space on $wpdb->update
- How to include and use custom class files in plugin?
- Strip HTML comments from plugins in header/footer
- Creating a menu page in a Object Oriented developed plugin
- send_headers don’t work on wordpress multisite
- Current user in plugin returns NULL
- How to structure a plugin into multiple files using classes?
- Why am i getting this error? WordPress database error: [Query was empty]
- Inserting large amounts of data into a custom table during plugin install
- adding meta data using plugin to top of head
- Override WP Class Private Function
- Calling custom plugin class methods from a template
- Getting user roles in plugin files
- plugin ajax to external php file always return null
- Plugin activation hook in an abstract class
- When to call add_filter
- WordPress Redirect Not Working – AJAX Callback Response Not Picked Up
- Doubt using $wpbd->get_col for a single column
- Headers already sent when I try to add headers via a shortcode
- Access WordPress database outside of WordPress
- plugin class inheritance. cannot change variable
- Correct way to perform non-cacheable DB query
- WordPress repository forbids me call wp-load.php in non-WordPress file
- Help With MySQL to WPDB Query Conversion
- Show an image in my header.php
- Creating mySQL procedure with $wpdb
- Headers Content-Security-Policy CSP Major Issue
- How to debug error message: Cannot modify header information
- Problem with creating tables for Plugin
- Most efficient way to use classes to create admin pages using Settings API
- Change commission_status paid when withdraw_status vendor is completed
- Basic Object Oriented plugin question
- Using plugin functions/methods within templates
- $wpdb->get_row returns column name instead of column value
- Create a table with wordpress plugin boilerplate
- How to handle cookies from a WordPress plugin on a cached page?
- accessing parent variables in child construct without executing action in parent
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- Using wpdb without loading all plug-ins via wp-load.php
- What does making sure “that your theme is WordPress header and footer tag enabled” mean?
- Know which plugin is calling JS in wp_head()?
- My single.php page does not show the related data to the post which is clicked
- Enqueue stylesheet in plugin for wp-login.php
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Why function hooked using object are executing at all time?
- Proper way to trigger a MySQL query via link in a plugin
- Problems with installing and deleting plugins
- get_var result empty for query of custom table in plugin admin
- How do add_action and WP_Query
- Change text “My Basket” in woocommerce artificer theme
- private functions in plugins
- Plugin won’t activate, fatal error (widget class not found)
- WordPress repository forbids me call wp-load.php in non-WordPress file
- OOP Plugin: Where should I place the action hooks in the class?
- Making plugin to use different table prefix cause permission problem
- Is it safe to increase/alter the size of the wp_post.guid column from VARCHAR(255) to VARCHAR(2048)?
- Global Handle to Class unavailable in Plugin?
- How to laod wp_enqueue_style to another header i created my self
- Get all the related data from WordPress DB
- Strict Standards: Non-static method in sidebar generator
- Cannot modify header information – headers already sent by
- $wpdb selects wrong database
- How to dispaly post informations (such as titles) in an admin plugin menu page?
- Plugin: Custom menu item problem
- FATAL ERROR: WP complains about redeclaration [closed]
- Function not being called on form submit, only blank admin-post.php page
- Footer option is missing in Customiser
- How to check record is exist or not in WordPress CRUD Operation with $wpdb
- No Google Analytics code rendered in the header?
- wp db request without refreshing the page
- Is it possible to use Classes between WordPress plugins with separate namespaces?
- WordPress Action Hook inside Classes
- all plug-ins load scripts on all pages
- How to create a dynamically created page on wordpress plugin?