you do not have to specify the $wpdb again in your query, but be sure that your table uses the prefix, if it has one. if it doesn’t, skip the part with the prefix.
also, you should always prepare a manually added query first.
this should do it:
global $wpdb;
$query = $wpdb->prepare( "SELECT * FROM %s", "{$wpdb->prefix}cart66_products" );
$rawproducts = $wpdb->get_results( $query );
print_r($rawproducts);
Related Posts:
- What are the differences between B trees and B+ trees?
- Strange Characters in database text: Ã, Ã, ¢, â‚ €,
- Dealing with Many Meta Values, 30+
- wp_users user_status field
- Display data from a non wordpress database on a page template
- Is it possible to switch the data layer within WordPress?
- Changing the Database Connection Error Message
- What is the most secure way to store post meta data in WP?
- Have multiple local wordpress installs share a wp-content folder and database
- Connecting to external oracle database
- Bulk Update of Custom Post Type Post Status through SQL
- How do I add indexes to WordPress Database?
- Faulty restore of the database, encoding issue
- Huge wp_options table
- Can’t save ajax value to database
- Why does WordPress rely on an fully qualified site_url with a 15-step plan for moving a site?
- I have a problem with my WordPress DB after I tried to install multi-site
- Database sync between local and production
- WordPress and automated MySQL backups to a different host
- Size article thumbnails and retrieve them directly from database
- Database error Deadlock found when trying to get lock; try restarting
- Connect Second Database to WordPress
- update_user_meta() does not work
- How can I create a Bible search engine via WordPress? [closed]
- Error establishing a database connection; After importing DB & Theme
- Check if column exists for one table in DB
- Where are WP_Errors Saved
- Get all images from this database table
- Delete transients in website
- Error establishing database connection – high traffic?
- wp_get_current_user always returns 0 continued
- Bulk-create posts from SQL database
- Allow logged in users to store and display some data
- I am switching laptops. I host my WP server through MAMP. I want to transfer [closed]
- How can i customize the export personal data file?
- How to merge two WordPress databases with the same structure?
- Is there a solution to auto-post data to a WP post from a database
- Auto login subdomain from main domain on single sites with different DB
- Logins from WP users table use on another page
- Uknown meta entries in wp_postmeta
- Error establishing a database connection problem in xampp saver
- WordPress site URL changed; how to fix it without database access?
- I’m not able to get access to $wpdb [duplicate]
- “Error establishing a database connection” – Intermittent error on GoDaddy
- Importing Direct to DB – GUID Question
- Create table with dbDelta,can’t put any DEFAULT data
- WordPress database connection [closed]
- Changing between Local Host DB to Production DB and in reverse
- WordPress site to be able to connect with data on local machine of user
- Bulk Updating Post Date in 1 day Increments
- What is the purpose of the “term_id” column in the “wp_term_taxonomy” table?
- Query Column of Specific ID from Database Table
- Posting variables to WP database using $_POST method
- Debugging – logging database queries
- Link image with data from the wpdb
- Update multiple rows in one query
- How to direct my site to the proper URL without Dashboard
- User Tracking for Custom Post Type “Lesson”. Database Queries and Performance
- Understanding WordPress Search
- access JSON results from wordpress database with wpdb
- Re-creating a WordPress database
- contact form-7 drop downs not populating database [closed]
- Cloning blog to localhost via WAMP
- Button to update database row from admin menu
- How do I get database rows from a custom table using wpdb?
- Realtime database update from 3rd party apps (notion, airtable, sheet, etc)
- Join Query on WP_USERMETA Table
- WordPress Settings API Overrides My Previous Value
- Move Non-WordPress users table to WordPress database
- How to check and get json object in WP database?
- Is there an actual way to synchronize ‘production’ and ‘develop’ WordPress databases?
- Lost database connection
- How to force set same page as homepage and blogpage in static page settings
- Getting values from form and saving in database but spaces are inserted instead of form values
- Can someoene please help with customization of a post?
- Exporting Post ID, Post Title, Primary Category and Primary Category ID
- how restrict user to give star ratings once for a post?
- Updating Posts table in database without overwriting user generated content
- WordPress credentials not matched
- How to set posts to draft in bulk based on the content of the post
- 2 $wpdb queries causing error Table ‘wp_postmeta’ is specified twice, both as a target for ‘UPDATE’
- Confused over wp-config.php and ‘database user + database password + name’
- Performance bug – slow DB query
- Change Domain name in database
- Copy WordPress to new directory
- Changed meta_key value in structures, now dashboard shows zero users
- Link wordpress with a SQl + MongoDB + .NET
- What am I doing wrong here? WordPress database error
- Why is converting my database to UTF-8 truncating entries?
- How can I work on a database along side a client?
- /var/run/mysqld/mysqld.sock
- WordPress site seems convinced that it’s still at its old URL
- Database question while Migrating from one domain to another on same WebHost [Bluehost]
- I broke database after reuploading local version – what exactly happened? Database error
- Working local with one database
- export individual posts to text files or a single csv file
- How can I rebuild my websites while I don’t have databases?
- Can I connect WordPress website with an external database?
- How do I find users by password?
- Is it possible to have a form page for logged-out users where values are stored persistently?