MySQL is an open-source, relational database management system.

learn more… | top users | synonyms

0
votes
0answers
18 views

How to translate this mySQL query to $wpdb query

I'm having trouble recreating a query from straight mySQL to $wpdb compatible. SELECT meta_value FROM `wp_postmeta` WHERE meta_key = 'review_rating' AND meta_value = 5 AND post_id IN ...
0
votes
2answers
34 views

Wordpress SQL Issue not returning correct reselts

So, I have been working on an SQL query involving the users and usermeta tables in wordpress. I am not getting the correct results. I have the following query written SELECT * FROM ...
0
votes
1answer
18 views

$wpdb select all meta for each post

I'm running the following query trying to get the data and associated meta data of a huge number of posts: SELECT wp_posts.post_title, wp_posts.post_date, wp_posts.ID, wp_postmeta.post_id, ...
0
votes
1answer
20 views

Wp query show post by author name or post title or post content

I have to create a search query which allows me to filter all posts where author name and post titles or post content has the word from search textbox. So if i search wordpress it should list all the ...
0
votes
0answers
18 views

Import SQL backup

So I accidentally deleted MySQL database of my wordpress, but my site is still running, I can access all the file in the filezilla but I just can't access the admin area of wordpress to make any ...
1
vote
0answers
21 views

MySql query to get posts with all meta and terms

I'm trying to figureout a way to get all fields from wp_post with all of their custom fields and categories in one mysql query. So in one row of the result I should have post fields with their custom ...
0
votes
1answer
30 views

WooCommerce - Query for ordered products

I'm trying to obtain all orders for particular day/time and then order products using SQL (MySQL) as seen in the query below: select p.ID as order_id, p.post_date, i.order_item_name, ...
1
vote
0answers
22 views

Trouble Migrating all data blog from Wordpress.com to Wordpress.org

I'm transferring a WordPress.com blog to a new WordPress.org website but I'm having trouble transferring everything. I've gone through the usual WordPress tools - export XML file, import using the ...
0
votes
3answers
96 views

How to Mysql select a list of posts with meta_values AND all relevant categories?

I am trying to produce a list of posts and display a report which shows both some meta_values for each post, but also a list of all categories to which each post is attached. I am using the nifty ...
0
votes
0answers
51 views

Cannot login into non-profit website anymore

To preface, I have read the Wordpress Codex "Login Trouble" page and tried everything there. Due to the website being a non-profit and helping animals its a big problem. Basically I had an issue a ...
0
votes
0answers
17 views

Bulk find replace to convert hundreds of old URL calls

We have a new wordpress site generated from an old html site with thousands of pages. An import process was used, but unfortunately as a result the site has hundreds of references within content to ...
0
votes
0answers
31 views

How send simple push notification from php in android

I want to send android push notification from php. I have created admin in php & mysql when admin approve anything from admin than send notification to user.
0
votes
0answers
30 views

How to install wordpress on university server?

Recently my supervisor asked me to install wordpress on the server. Indeed, I have no access to root. I just have a ssh access to the server and the operating system on the server is Linux. What steps ...
0
votes
0answers
43 views

How Can I lock function to prevent running multiple instances in one time?

I have written a plugin. There's a function int it that works with a DB table and (works on a data tree) ,I want if function starts running ,other instances lock until it finishes(then other instance ...
1
vote
2answers
44 views

What is a valid parent for get_terms()?

get_terms($taxonomy, array('parent' => $parent)); This works for some parents and returns an empty array for others. I checked if a term with the parent ID exists and if the same ID is in the ...
0
votes
1answer
23 views

Buddypress avatar image in database [closed]

I want to get path of buddy-press profile pic directly in database to be used on other then word-press platform but i am not able to find it in database.. because i can't use buddy-press functions in ...
1
vote
2answers
39 views

PHP code inside shortcodes

Basically, I have this line of code: <?php echo do_shortcode('[O_U user_name="operator" blocked_message="This page is restricted for guests."] **Content Goes here** [/O_U]'); ?> Now, inside ...
0
votes
1answer
33 views

Help me filter get_adjacent_post

I'm not keen on private posts interspersed with published posts on the front end, so I'm writing a plugin that seeks to segregate and separate them out. As part of this I want to modify the post ...
4
votes
1answer
40 views

How to define composite keys with dbDelta()

I am getting error while trying to create a table with dbDelta() and composite primary key. The sql is pretty straight forward. $sql = "CREATE TABLE {$wpdb->prefix}voicemail_call ( user_id ...
0
votes
0answers
27 views

update_user_meta and wp_update_user not working

I have an array of users that I've successfully updated as described here foreach ($users_out as $key_u => $value_u) { $user_id = $value_u['writer_id']; $user_login = $value_u['username']; ...
0
votes
0answers
36 views

Getting invalid user ID error when creating a new user with wp_insert_user

I'm trying to insert users into wordpress from a foreign database and I've prepared my $userdata as foreach ($users_out as $key_u => $value_u) { $user_id = $value_u['writer_id']; ...
0
votes
0answers
21 views

Find page metadata in database

I want to insert metadata to custom fields (from "advanced custom fields" plugin) manually (with wp_update_post_meta). I need to know how the meta value strings look like so I can insert this kind ...
1
vote
1answer
24 views

$wpdb to insert html form information

I'm trying to insert posted variables from a form. When I shorten the amount of variables I'm inserting it will sometime pass the information in my mysql database. Once I continue to add on ...
0
votes
3answers
59 views

MySQL query in Wordpress with AJAX

I have a search form which searches the DB and returns back some data. I have managed to use Wordpress wpdb to connect and use select statement on the table and retrieve data. Everything works ...
1
vote
0answers
15 views

Enabling plugin failed because MySQL user has CREATE permissions

Has anyone else had this problem? I'm trying to enable SearchWP plugin (but i don't think this is that specific plugin problem, but maybe my settings?) but it gives me the following error: Please ...
1
vote
1answer
32 views

Delete all post meta except featured image

My aim is to clear up my database entries. I did a migration from blogger which added many useless post_meta. I found a plugin (db reset) that has the option to reset/delete all post meta. However if ...
-3
votes
1answer
34 views

Does anyone know what the wp_snp_stats table is? Maybe I was hacked?

Nothing is pulling up in Google. I've got a good handle on all my plugins that create custom tables. If you're familiar with this table, please let me know. Or else I have a long road ahead. Thx
3
votes
1answer
38 views

Converting mysql to $wpdb

I'm trying to convert this to using a $wpdb class. It will return all the enums possible and i have to use this $wpdb due to mysql_query giving me weird error (no database selected) Code is following ...
0
votes
1answer
40 views

Sql - Search with serialized Data / better database concept

I know this question was already answered. But I hope someone can help me in my specific Problem. I have a custom Post Type. For this Post Type the user can declare 1 to X Datetime ranges with a ...
0
votes
0answers
14 views

Editing a Wordpress SQL table in Phpmyadmin, however its not saving

I'm trying to edit the wp_options table in Phpmyadmin, I can edit it fine using inline editing or the edit feature. Each time I log into phpmyadmin I can see the value has changed to the one I edited. ...
0
votes
1answer
53 views

Processing forms with php to wordpress database

I'm simply trying to process data from an html form into my wordpress database through php. I've tried multiple times to get the data inserted but have had no luck. The setup is as follows: Database ...
0
votes
1answer
44 views

MySQL - How to combine data from two tables into one?

So I am trying to do something a little above my knowledge base, i think. Here's what I am trying to do: I want to insert values from a form into a subscriber table ( first_name, last_name, email). ...
1
vote
1answer
26 views

Database: Custom table: sprintf value for DateTime column

I am creating an insert query following the insert example on the wpdb class reference. What sprintf like placeholder should be used for a DateTime column on a custom table? Allowed placeholders seem ...
1
vote
0answers
41 views

inserting a post from an extern php file but post content doesn't show on wp site

I'm doing a php file that insert post's on my wordpress site. I'm filling all the fields in wp_posts, but the content doesn't shows on my wordpress site. I wonder if it's because the categories are ...
1
vote
0answers
49 views

Proper usage of $wpdb->update()?

I am trying to update my custom table in Wordpress using the following php code but still no success: $tablename = "wpfeedback"; $data = array( 'mark' => $mark, 'comment' => ...
0
votes
0answers
37 views

I want to query for the 'post' and 'attachment' in wordpress using SQL query

How do I write a SQL query which will allow me to query for the 'post' and 'attachment' at the same time in MySQL? I am trying to get this information from the wordpress 'Posts' table. Please see my ...
0
votes
1answer
39 views

How to insert dash (-) into database using wpdb and new_to_publish hook?

I am saving titles of posts in a separate table for a specific use. The titles are saved to the database when a post is published. code is: add_action('future_to_publish', ...
0
votes
0answers
283 views

Insert data into mysql database with php and ajax

I made admin menu inside wordpress and I have form that allows admin to insert some values. I have html: <form id="prices_form" method="post" action=""> <div ...
0
votes
2answers
27 views

get_results() query not working only when entering strings

I'm trying to send a query to a database, WHERE works fine if I'm querying for a number but not for a string. Example, if I try: $all_pages = $wpdb->get_results('SELECT post_title, guid FROM ...
0
votes
0answers
39 views

Remove Special Characters from Wordpress Media File Names in HTML

I've removed all the special characters from media filenames in the database (meta_key - _wp_attached_file - filename), I've renamed the files in the FTP and rebuilt the thumbnails a few times. ...
0
votes
1answer
108 views

Live search from database table

I have wordpress site. I made custom table and sotred values in one row. Now I made admin menu and added input field into it. <input id="location1" type="text" /> I need to predict search ...
0
votes
0answers
19 views

Error establishing a database connection But all is same

I was upload my web file and MySQL base to CPANEL. Database name, user and password is all SAME in my config.php file. BUT i cant connect my web. /** The name of the database for WordPress */ ...
0
votes
1answer
15 views

WP_Query with page_ids in arguments without a result

I want to get some pages with WP_Query: $resume_args = array(); $resume_args['post_type'] = 'resume'; $resume_args['posts_per_page'] = -1; //$resume_args['page_id'] = array(9046, 9346); //No ...
0
votes
0answers
25 views

Display data form externally table as posts?

I have an external MySQL table with roughly 4,000 rows and would like to display each row as a post within my Wordpress blog. The table grows almost daily so ideally I would like users to be able to ...
2
votes
1answer
44 views

Best settings for MySQL to speed up site? [closed]

What are the best settings for MySQL to speed up a WordPress site?
0
votes
0answers
22 views

Add/edit row/rows in tables

I've done some tables in my wordpress-database: area, producer and product where one area contains many producers and where the producer contains many products. How to do a menuoption in the Admin ...
0
votes
1answer
237 views

Processing ajax call to php to insert into mysql database

I made top menu in wp admin dashboard. There I will have input field. It will be input where admin can enter Google locations. After picking correct location admin will press save and location will be ...
0
votes
1answer
50 views

Gaining Login Access via the Database

I have been given a job to amend a Wordpress site. I have only been given access to Cpanel. My questions are can i log in to the back end of Wordpress via Cpanel? If you can't login via Cpanel can i ...
0
votes
0answers
32 views

Export User Info into CSV - Additional Column (post_title)

I'm using the 'Export Users to CSV' a plugin for wordpress. By default, The plugin only extracts wp_users and wp_usermeta I have been wanting to add post_title column from wp_posts. I was able to ...
1
vote
0answers
43 views

Manually query posts by taxonomy with MySQL

I'm trying to query posts from the WP database with the category uncategorised, while also joining the post meta table, but I can't get it to work. I get an empty result. This is my query SELECT * ...