MySQL is an open-source, relational database management system.
2
votes
2answers
325 views
mysql custom wp query
this code is designed to select posts with selected meta value in wordpress query
<?php $values = $wpdb->get_results("SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = ...
0
votes
1answer
266 views
How to create a blogs category page with Blog-Types Plugin
I'm not a web developer so I don't know how to create an sql query to display information from my database.
Here's what I wanted to do, I want to have a page that will display blog categories. When a ...
0
votes
1answer
792 views
Inserting data into MagicFields using mysql queries
PART 01: INTRO
Hey Stackexchange
Greetings from the Snowy alps of Norway
I have now tried for two full consecutive days to
reverse engineer Magic Fields. Why?
Because I am a simple man, and want to ...
0
votes
1answer
15 views
Ubuntu 12.04, Nginx and MySQL issue with Wordpress Database
Twice I installed a fresh LEMP Ubuntu 12.04 instalation on my server and started to build a wordpress site on my VPS following This tutorial. Now, for the second time, after a while I can't write do ...
0
votes
1answer
318 views
Advanced Custom Fields Array Population
I'm trying to populate a ACF select field with an array from a custom $wpdb->get_results call, which is essentially a list of categories from my db.
I have the following:
global $wpdb;
...
3
votes
2answers
296 views
WordPress use innodb by default?
I just created a new WordPress site in my server. Normally, WordPress uses MyISAM as the database type. But this time, it created all InnoDB tables! Is this normal? Has WordPress switched to InnoDB in ...
0
votes
1answer
8 views
Should I use Wordpress to skin a database website?
I am going to start programming a website which allows users to post adverts for aircraft for sale. (Think autotrader for planes). It will be free to use. There are a few websites that do this already ...
0
votes
1answer
111 views
Contact form with database integration issue
This is more a question about the idea I am going to share and ask for advice for.
I would like to have a contact form on my site, where people complete their data and it gets stored inside a ...
0
votes
1answer
27 views
php include not working in custom page
The Problem
I have a db.php file which contains mysql login details. I want it in a separate file like this so it can be linked in several different pages for easier tracing later.
This all works ...
1
vote
2answers
47 views
Concurrent / simultaneous MySQL connections
I've been looking for the best WordPress hosting for me and I'm wondering how many MySQL connections at once WordPress requires? I know this is kind of general question but how does it look for you?
...
1
vote
1answer
22 views
Searching With Apostrophe
I'm having trouble with my custom theme's search function. I have a number of posts with apostrophes in the title. For example, McDonald's.
However, when I try searching say McDonalds, the post won't ...
1
vote
1answer
195 views
How to let a user choose an authors and save it to the database?
I have a multi-author Wordpress site which reads different rss feeds and posts them to my page. I was wondering if it is possible to make a code that would provide an opportunity to registered user ...
1
vote
1answer
915 views
How to get a Google maps SQL->XML->map marker tutorial to work in WordPress
I have been trying to figure out what is wrong with my code for a couple days now, and I cant seem to crack it. I am trying to follow this tutorial: ...
0
votes
2answers
36 views
How should I troubleshoot a database serialization issue with a WordPress migration
I'm migrating a WordPress site from one server to another, and the entire migration seems fine, except the sidebars aren't moving over properly. The obvious thing that comes to mind is a serialization ...
0
votes
0answers
29 views
How to fix database error duplicate entry
At first I thought this was just a damaged table, so I tried repairing via MySQL, but it appears there's more fundamental issues.
Which of the duplicates should I remove, and any further advice in ...
0
votes
0answers
38 views
Using mysql queries to delete custom post types based on meta_value
I am trying to create a cron job to run on my server which deletes a custom post_type (post_type = event) from my databse based on a meta_key (st_date) and a meta_value (the date the event took place ...
0
votes
0answers
24 views
Second ezSQL initialization for MSSQL
We are trying to pull data from a second database into Wordpress. The secondary database is used internally to store data, and Wordpress (also only used internal) is partially used to display some of ...
-1
votes
0answers
25 views
Execute mySQL query on publishing of post
I would like to post some data to a db when certain categories are selected in a WP post. I would like this to action when the post is made.
This is the query I want to run:
mysqli_query( $con, ...
1
vote
1answer
39 views
Bad Request (Invalid Hostname) on working server, database problem
I have a local server up using EasyPHP. I know its working because I have a default wordpress install running and up on my brower. I have a full site which I also know I have working because when I ...
2
votes
1answer
52 views
little help with a mySQL query to wp database
@t31os gave a very helpful response to:
getting all values for a custom field key (cross-post) by providing this function
if ( ! function_exists( 'get_meta_values' ) ) {
function get_meta_values( ...
-1
votes
1answer
29 views
FIND and REPLACE wp_posts AND IGNORE custom post type mysql query
does exists some MYSQL query for FIND and REPLACE wp_posts AND IGNORE all other wordpress and buddypress posts (buddypress-docs) and also custom post type = portfolio ? I want to find and replace only ...
0
votes
1answer
28 views
Migrating database / content of non-CMS site to Wordpress
I have a non-CMS website which is fully build with PHP with a lot of content in it. I don't want to add my posts manually in Wordpress, because that's a pain in the ass (I am talking about 5000 ...
0
votes
2answers
65 views
making php value numeric
I used some of this code from this page on Stack Overflow:
Using wp_query is it possible to orderby taxonomy?
It's about the function to be able to sort a query by a taxonomy value. Although it works ...
1
vote
2answers
873 views
Help with MySQL to $WPDB query
Here's my issue. I have three tables I'd like to query - states, points, and state_points.
States contains stateid, and name. Points: pointid, pointlat, pointlng. State_points: Stateid, Pointid.
...
0
votes
1answer
256 views
Get post featured image id with $wpdb
I'm not a sql expert, but with some help and copying from queries I've found on the web I got this working one that gets the 20 closest places (custom post type) to a specific latitude and longitude ...
0
votes
1answer
27 views
How do I display offsite database info on my wordpress site?
I host some online games from my personal computer which the game saves information to my Mysql database. I would like to display live data (if possible) on my hosted Wordpress site. I know the ...
0
votes
1answer
30 views
HTML Entities in Post Title
I'm inserting posts into wordpress using a script which is loaded through CRON. Before inserting each post I am checking whether the post with the same title exists or not. Below is the snippet I'm ...
2
votes
1answer
158 views
Grouping related postmeta data via SQL query
I am using someone else's WP plugin which stores lots of related data in wp_postmeta using an "artificial key". So effectively we hijack wp_postmeta to create a nested relational database. So one row ...
4
votes
2answers
63 views
How to log mysql errors from wordpress core?
I am developing a wordpress site and I would like to be able to log and handle mysql errors from wordpress core.
My site has a mix of wordpress pages and posts + a few php pages that run under the ...
0
votes
1answer
29 views
Best practice to limit results in get_row()?
This is my query to check if a title exists (it's in a loop, therefore [$i]).
$wpdb->get_row("SELECT * FROM wp_posts WHERE post_title = '" . $titles_arr[$i] . "'", 'ARRAY_A');
Anyway, I would ...
0
votes
1answer
349 views
the_author_meta not working
I'm trying to use the_author_meta to retrieve some links which users can set in their profile.
I set up extra profile fields and they are saving to the database.
On my author.php I have the ...
1
vote
1answer
495 views
Get multiple custom field values in a $wpdb query [duplicate]
Possible Duplicate:
How to query posts based on lat-lng coordinate as post meta?
I want to create a $wpdb query that select the closest places (custom post type) near the current ...
0
votes
1answer
115 views
Efficiently loop over huge number of posts
I want to loop all posts to do some processing, but one of my concern is there are many posts and it might used up my memory, so I want to loop posts with offset, something like paging.
e.g.
$posts ...
0
votes
1answer
134 views
Pull post name from value of a specific meta key
I am looking for help on how to pull post name from custom field value
for example
in wp_posts post id = 200, and there are corresponding meta key and values with post_id= 200 in wp_postmeta
I want ...
1
vote
2answers
56 views
wp_insert_post sometimes fails after API call
I have built a plugin that fires an Ajax call to connect to a third-party API. That API returns some Json, which I then save as a custom post with wp_insert_post.
Now, usually, this works. But, now ...
1
vote
1answer
51 views
Mysql query and order meta value
I made a mysql query to WordPress like this:
$querystr = "
SELECT $wpdb->posts.*
FROM $wpdb->posts, $wpdb->postmeta
WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id
AND ...
-1
votes
1answer
61 views
Custom SQL Query for Wordpress page
I'm quite new to wordpress.
I'm trying to build a tableview within a wordpress page. Therfore I need a custom SQL Query to my MySQL Database.
Query data from my MySQL Database
Get the result somehow ...
1
vote
1answer
62 views
Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)
It's something I noticed ever since I started working with WordPress. It's a universal issue, in the sense that it doesn't matter if the WP installation is on my shared hosting account (haven't tried ...
1
vote
1answer
66 views
How to prevent execution of default query, while preserving ability to use WP_Query in template?
PROBLEM: I'am trying to prevent execution of default WordPress query for custom category template. I have found a possible solution, but looks like it preventing execution of all post queries:
...
2
votes
2answers
535 views
Check if post of title already exists
I'm writing a plugin that takes an xml feed and posts it into WordPress using wp-cron
Everything is working dandy, except it keeps adding the same posts over again.
So, I'm working on a system to ...
1
vote
2answers
97 views
Error establishing database connection - high traffic?
I have a WordPress 3.5.1 site that's getting a little bit of traffic (80 concurrent visitors, ~5 clicks/pageviews per second). The site runs fine until it spikes to ~85 visitors. There are usually 4 ...
-1
votes
1answer
114 views
How can I debug my database connection for unit testing?
I've set up a wordpress environment on my Mac with MAMP and I'm running 3.5.1 locally (i.e. http://localhost:8888/blog works). I'm trying to run the unit test suit from wordpress.org and having ...
0
votes
1answer
38 views
Print output of Table Creation
I am creating a few tables and I getting the following message:
The plugin generated 440 characters of unexpected output during
activation. If you notice “headers already sent” messages, ...
0
votes
0answers
41 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
0answers
35 views
Wordpress post saves until Apostrophe (’) is used
I've installed wordpress onto a fresh VPS with nginx + php-fpm, the installation works fine apart from whenever I post something with a ’ the post ends there.
It's looks to be some sort of escape ...
0
votes
1answer
1k views
Query to delete all featured images and remove post meta?
I'd like to run an SQL query to find all featured images from posts and delete the file itself and any references to it.
Can anyone tell me how to accomplish this? Many thanks!
1
vote
2answers
472 views
Import 10,000 Users into Wordpress WITH a specific ID for each user
I have a website which has about 10,000 users. I am converting this site over to Wordpress. The new site is ready to roll, but I have to bring over all the users.
There are a number of plugins ...
0
votes
2answers
80 views
How to copy post titles to post slug in phpmyadmin
I just imported 1000 post into a custom post type on a site and the slugs are all blank. There is a problem with the importing plugin i'm using. My SQL is weak :-/ know what i need to do but not sure ...
0
votes
0answers
80 views
Custom query on Wordpress custom table
I am working with a custom table where some values will be inserted or updated if they already exists, I have checked and rechecked the syntax and it seems to be working fine, if I run the same query ...
0
votes
0answers
225 views
Creating a custom Jquery modal form to upload data in wordpress 3.5.1 [closed]
i am new to jquery.I looked to various demos but can't find what i am looking for.
I want to add a upload item feature in my wordpress website.This feature is available to the end user after he/she ...

