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

learn more… | top users | synonyms

1
vote
1answer
31 views

Enabling plugin failed because MySQL user do not have 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
86 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
92 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
79 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
99 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
16 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
87 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
93 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
72 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
98 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
90 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
93 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
105 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', 'send_emails_on_new_event');...
0
votes
0answers
580 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 style=font-weight:bold;...
0
votes
2answers
29 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
113 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
276 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
22 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 */ define('...
0
votes
1answer
18 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
33 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
53 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
26 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
524 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
56 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
39 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
128 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 * ...
0
votes
1answer
410 views

Inserting Post Meta From SQL

I'm trying to get post meta to be updated/replaced with $wpdb and running into issues. I have working SQL, but cannot get it work when coding it up for my WP plugin. Extra note: The post meta being ...
1
vote
1answer
14 views

My SQL function to change user_name

My wordPress database was hacked and all users_names were changed to the same thing. I'd like to write a mySql query to replace all usernames that = "x" to the user_nicename. I'm unsure how to do this ...
0
votes
1answer
86 views

How to properly send many mysql queries via php and what happens with ajax requests after they are sent?

I need to update the details of a few thousand accounts and I can't do it with pure MySQL, I need php too. With all the loops that's probably around 100k mysql queries. I chose to do it via a button ...
1
vote
0answers
23 views

Regarding “Insert query error” in wordpress

I am getting "Insert query error" in my WordPress eCommerce website when I click on the place order button. My error is: Insert query error - Table 'i1503672_wp6.wp_wa_product_orders' doesn't ...
0
votes
2answers
45 views

Re-writing MySQl query for execute faster

Can any one re-write this SQL query to perform better? At present this query takes about 29 seconds to execute in BlueHost server while it takes 6 seconds in HostGator.com server. My intention is ...
1
vote
2answers
40 views

What happens if I overwrite the current wp_options table with a backup from a week ago?

I have a rather silly situation. I tried this query UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins'; which disabled all my plugins. I was testing some issues on ...
0
votes
1answer
48 views

Geographical proximity query using post_meta

I realise this might be an inefficient query, but I'm trying to grab latitude and longitude values from the post_meta table that are connected to posts to figure out the proximity of the posts to a ...
0
votes
1answer
38 views

Custom post order when using OR relation

I have a custom post type named Faculty. They can be any of the type MCT, MLT, or MT. MCT -> A, B MLT -> C, E MT -> C, D I want to list all MLT and MT faculty on a page in order by last ...
0
votes
0answers
21 views

Ordering topics by most replies in X days using MYSQL statement

I'm using the following MySQL statement to grab the topics (BBpress custom post type) that have the most replies (custom post type like comments) in the last X days. However I've found that I get ...
0
votes
1answer
22 views

Copy from wordpress for dev gives different output in browser

I'm trying to accomplish the following: Havin a copy of the current live site to do some development. I would currently prefer to have the dev site on the same server. I did the following: List ...
0
votes
1answer
554 views

Migration problems with mysql: Operation not allowed when innodb_forced_recovery > 0 [closed]

I'm transferring a bunch of domains a new host. The site names remain the same, and for the sites I've already migrated, no manipulation was necessary in the database. It just works once name-servers ...
0
votes
1answer
953 views

MySQL: How to change url in posts from xxx.com to yyy.org?

Recently I switched my domain, unfortunately before that a lot of posts had internal linking to my own other posts by including the old yyy.com domain. I need to change it in all my posts, via MySQL ...
0
votes
1answer
64 views

What should a WordPress developer know about MySQL? [closed]

During my 1 year job, I usually get to work with the front end and rarely get a chance to run any query. I have written 0 queries so far. What knowledge of MySQL should a WordPress developer have?
0
votes
1answer
80 views

wp_usermeta - Read from database, but save function broken

I added a custom field to the profile-page of WordPress users called "uidnumber" and it reads values from the database just fine, however it just doesn't save anything. I'd rather save it in ...
0
votes
2answers
43 views

How do I change the user via SQL?

I change a user via SQL in wordpress: SET @old_user='old_user'; SET @new_user='new_user'; UPDATE wp_users SET user_login = replace(user_login, @old_user, @new_user); UPDATE wp_users SET ...
2
votes
2answers
127 views

Proper way to work with wpdb to get user's firstname

I want to use $wpdb to get user's firstname. I know how to do it with php and mysql query, but I want to use $wpdb. The problem is that I don't know how to use it. I tried to create simple query to ...
0
votes
0answers
67 views

SQL Query to export Buddypress Profile data

I need to use sql query to export for http://wpdatatables.com, the code the plugin generates comes with error and I've tried phpmyadmin and sql pro with same error SELECT wp_bp_xprofile_data.value, ...
1
vote
1answer
32 views

Unable to set a default serialized array using dbdelta()

I am trying to set up a table with dbDelta() and one of the columns will have as default a serialized array with predefined values. The issue here is that dbDelta() explodes the query using ...
0
votes
0answers
58 views

Render a Wordpress menu from outside Wordpress?

I would like to render a menu in another system outside wordpress using SQL to fetch the menu contents and some logic to build the actual menu. I turned on mysql logging to see what wordpress was ...
0
votes
1answer
80 views

Edit Account - read and write to MySQL

I have user data that's being saved to and read from the database as they are all standard WordPress fields. example: $user->user_email And here's the code I have inside the form-edit-account....
1
vote
0answers
27 views

How to add a private user page populated from sql?

I have taken over management of a Boy Scout website for around 75 kids. The site is a vanilla WordPress site and has no access control (other than admin). I would like a scout/parent to be able to ...
0
votes
0answers
45 views

Posts page in WordPress dashboard very slow

I have a WordPress install that has about 4800+ posts. Most of the posts does heavy usages of categories and tags. My site itself is very responsive, but on dashboard, specifically Posts > All ...
0
votes
0answers
51 views

How to add form to insert the data to custom table using mysql?

here's my form: Full Name: email: Product no: ...
0
votes
0answers
16 views

SQL query to load a menu and contents [duplicate]

I would like to render a menu in another system outside wordpress using SQL to fetch the menu contents. I'm able to find a menu item based on the slug: SELECT * FROM `wp_terms` wt WHERE wt.slug = '...