Tagged Questions
0
votes
0answers
30 views
Using HyperDB to connect to a MS SQL database
I have successfully split my WordPress database into two MySQL databases (using hyperDB). And it works well. Now I want to dive into the unknown and have one database use MYSQL and the other MS ...
0
votes
1answer
47 views
Woocommerce: Grab total revenue of a product over all orders
I need to display the total revenue of all orders for my products depending on if the logged-in user is the author of the product or not.
I can't use the Quantity field as a multiplier either because ...
0
votes
0answers
43 views
Custom Wordpress Meta Query
I have a post type (course) that has some meta data associated with it, namely the following two:
City and State
The two pieces of data above are stored in the postmeta table, with meta_keys ...
0
votes
1answer
41 views
finding out the top 5 source ( source is a custom taxonomy ), in a given category
The client I'm working with have thousands of articles and media ( audio/video ) files.
To WordPress, all are posted by Author ID 1, which we named as STAFF.
All the content though in reality has ...
1
vote
2answers
173 views
wpdb->prepare function remove single quote for %s in SQL statment
I am using the below wpdb->prepare function in a sql statement. I am passing in several variables some field names and some values. When I try to use the %s for the field name it puts single quotes ...
0
votes
3answers
188 views
Migrated to Namecheap, now Trouble with Database & wp-config [closed]
I have been using a free web host while I set up my WP site. Now that it's all done I went and bought hosting from Namecheap.
I uploaded the site and WordPress and everything seems to look fine, but ...
1
vote
0answers
132 views
Retrieve/get current image from Nextgen gallery db
I thought that I can do it using the database where the idea was to get the image from the ngg_gallery_pictures table, where the browser URL is equal to URL of the image in the table.
Then I will get ...
2
votes
1answer
164 views
Multipart/formatted MySQL query problem
I'm creating a plugin and I want to automate the creation of a MySQL Trigger on a table. The problem seems to be that $wpdb->query doesn't appear to accept either multipart statements and/or formatted ...
0
votes
2answers
621 views
export individual posts to text files or a single csv file
I'd like to export my blog posts to plain text files so I can version control and update them using emacs org-mode via the org2blog package. However, I'm unfamiliar with SQL and the wordpress ...
1
vote
1answer
286 views
Importing Geo data into wordpress database
I have a listing wordpress site and want to integrate geo data into the Wordpress MySQL Database for custom search functionality
I want to utilize different aspects to create different things...
...
0
votes
1answer
372 views
Speeding SQL queries for a large database?
I am using a WordPress plugin called feedwordpress in order to run a planet like website on wordpress (See it here).
The plugin is great except for one thing - it hogs down my (VPS) server into ...
0
votes
1answer
396 views
latency problems with wordpress install (from SQL import)
I develop wordpress sites for a living, and today I am experiencing something that I haven't yet come across: Extremely slow load times / latency problems. You can view the site here: ...
2
votes
3answers
3k views
How do you properly prepare a %LIKE% SQL statement?
I'd like to use a LIKE %text% statement while still using the WordPress $wpdb class to sanitize and prepare input.
SELECT column_1 from `prefix_my_table` WHERE column_2 LIKE '%something%';
I've ...
5
votes
6answers
16k views
What SQL Query to do a simple find and replace
Whenever I create a new website I first create a staging site on a subdomain like "stage.domain-name.com".
After everything works correctly I export the database, open it in notepad++ and do a ...
0
votes
2answers
2k views
Scanning Database for malicious Data
After a site of a friend has been hacked I told him he should just clean up the mess and restart from scratch so he know that no file has been altered.
I could scan the site for him with tools like ...
0
votes
3answers
523 views
Code to remove authors with no posts connected to them
I am looking for SQL code that I can run from phpmyadmin to remove all registered users on the blog that do not have any post associated with them.