You have written $wpdb incorrectly (3x) in your code example. If it is an exact copy it will never work. And you have a space in your SQL after prefix.’ which shouldn’t be there. And ‘From’ shoul dbe all caps.
Try this:
global $wpdb;
$sql="SELECT * FROM " . $wpdb->prefix . 'my_first_plugin';
$result = $wpdb->get_results($sql);
Related Posts:
- MySQL SELECT increment counter
- Is it fine to have foreign key as primary key?
- Detecting errors generated by $wpdb->get_results()
- wpdb update add current timestamp not working
- Restoring WordPress posts from database only
- Displaying content from one WP site on separate WP site
- Lost the `wp_options` table: what’s the best way to restore the site?
- Performance Gains of Relational DB Setup
- How to move existing WordPress wp-content folder along with database to new server and new domain name?
- store simple data in get_option()
- How might I retrieve a featured post image from an external WP site and display it as a link back?
- What are conventions about the schema of the $table_prefix
- WordPress database becoming huge. How to analyze and optimize it? fear of running out of memory
- BuddyPress: What’s the use of wp_bp_xprofile_data table and how does it get updated? [closed]
- storing database in version control
- Is deleting orphaned wp_options entries safe?
- How to build a movie database with wordpress?
- What’s the most efficient database method to add and query usermeta?
- How to solve slow WordPress site caused by attachment_metadata
- Is database safe after merging a branch of a more recent version over an older one?
- Sub-domain or 2nd, temporary different domain?
- How do i get user data from a custom table in the wordpress database by user ID?
- Converting WordPress into Android or iPhone app
- Large database causes slow load
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- Database slowdown after update to 3.4.1
- WooCommerce sku location in DB
- How to insert data into MySQL database from the form created in WordPress site
- Emoji support and MariaDB 10.0.30-
- Is it possible to store visitors IPs in wp_postmeta table?
- Can I have multiple database users within WordPress?
- How do I copy a wordpress database?
- Export all content from wordpress
- Import live site to local setup without access to live site
- Creating a Video Content Page (how to use query strings in wordpress)- Help!
- Modify Database in Multi-Site wp_usermeta table
- Form Data not getting stored in WordPress database
- Hook directly into query execution
- Best way to tell if a user account is active, using the database only
- $wpdb doesn’t like to store arrays
- Connect to a remote database for wordpress in my own hosting server
- WordPress ‘repairing database’ in a constant error loop?
- What Is the Proper Way to Merge Usermeta Table to a an existing WP Database?
- Importing CSV into database table not working?
- A MySQL DB within a MySQL DB
- “Database Connection Error” upon install in Apache VirtualHost document root.. Why did this happen? [closed]
- How Can I Put Meta_Compare in the Database-Query?
- Check if an option exists and get its value in one hit
- How do I convert a MySQL database from utf8mb4 to utf8 encoding?
- Why user_pass column in wp_users table is varchar(64)
- Best practice to limit results in get_row()?
- How to migrate a database from a server to another
- Which table (and column) has the content of configured get_post_meta?
- Serialize data before inserting into the DB
- Reinstalling wordpress from database breaks the site
- how to count click tab menu and insert to database
- Adding prefix to WordPress database tables breaks admin capabilities?
- What is the best way to resurrect and update my old WordPress site?
- Pages from custom table
- Trouble running $wpdb->query() with last_insert_id
- Using $wpdb | checking entered email against existing emails in db
- wp-cli: Error establishing a database connection: undefined constant DB_USER
- Can I customised default WP table
- Woocommerce – Check product stock availability from external database
- Get results from wordpress data custom table
- Outputting query results
- Help With a Large WordPress Based MySQL Database on Shared Hosting
- How to display data from db in select list [closed]
- Will adding & modifying default WordPress table index break future WordPress update
- Database migration issues – Error #1046 No database selected
- echo site_url() returns a different value than what is in the database siteurl field
- Can two domains use the same database?
- Search Character Set Problem
- Native timestamp on wp_options option
- SELECT rows between two datetimes when the range is dynamic [closed]
- How to get the full stack trace for WordPress “table doesn’t exist” error in debug.log?
- How to fix Uploaded to this post option to see group of images uploaded to a post?
- How to access a table in a wordpress database using REST API?
- error establishing a database connection 3
- User saved through WordPress backend does not show up in database table users
- Correct and secure way to access a custom SQL database in a custom PHP template file
- Missing latest posts and options after DB migration via phpMyAdmin
- get_the_terms is not working
- Custom metabox does not store data
- Return image urls with specific base string?
- Local host to server import problem
- Restoring .sql backup results in “Error establishing a database connection”
- Link to handle $_GET request
- WordPress sync with phpbb
- “MySQL server has gone away” since update to 3.8
- featured image not showing up with mysql_connect
- Getting deleted users in database
- Options of accessing wordpress data from mobile app
- Getting data from a table using a query
- Database interaction (private-public) [closed]
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- wp_usermeta key problem
- How to properly configure SSL connection to remote azure database for running queries within a WordPress environment
- Database Queries are crashing the server
- Uploading to WordPress Database