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

learn more… | top users | synonyms

0
votes
0answers
24 views

After Submitting Form Successfully, The Values Not Stored In Wordpress Database

<?php /** * * Template Name: xoneform * */ echo "Welcome to Xone Form"; ?> <?php print_r($_POST); if ( isset( $_POST['submit'] ) ){ $insert = $wpdb->insert( 'wp_xone_form', ...
0
votes
1answer
30 views

Use variable in SQL statement

I have this: <?php $jerseys = $wpdb->get_results("SELECT order_item_id, order_id FROM wp_woocommerce_order_items WHERE order_item_name = 'Mystery Jersey'"); echo "<p>Jerseys</p>"; ...
0
votes
1answer
24 views

Weird characters displayed when importing WordPress MySQL db

I was thinking that it may be the collation, but I have no way of know what the production db collation is. The local one has been changed between UTF8_bin and UTF8_general_ci, to no avail. I'm seeing ...
0
votes
1answer
74 views

Restore woocommerce orders

Recently my server team replaced my database and they put our previous Database . So we lost our order details of one day[particular day] . Now the server team give the backup that contain the lost ...
0
votes
2answers
51 views

How to get Attachments(image) with specific width\height ratio

I need to get attachment images with horizontal orientation. I tried to use Meta_Query but I don't know how to compare two values (width and height) from one associative array that is in wp_postmeta ...
0
votes
0answers
40 views

Query can not search data with space?

I have following code $wpdb->get_results( 'SELECT * FROM '.$device_token_table.' WHERE user_pushtoken="'.$server_method['user_pushtoken'].'" AND user_id = '.$user_id,ARRAY_A ); print_r($wpdb->...
0
votes
0answers
33 views

Join Wordpress databases from 2 different installs

I'm just now getting into SQL and the core of Wordpress (PHP). So I'm not an experienced WP developer but not intimidated by the tools. But, if the answers could be dummied down a bit would be very ...
0
votes
1answer
37 views

How to add query vars with paginated URLs?

How I can insert some custom url parameters to pagination links? the code below display like page.php?cpage=2 But I would like to add a parameter category with value fruit. So, the final url will ...
0
votes
0answers
32 views

WP_Query order by number of likes

I'm trying to configure WP_Query to order by number of likes. I have a custom table called 'likes', which records which liker (user ID) likes which post: id | liker | post_id 1 | 11 | 120 2 ...
0
votes
0answers
51 views

How to delete a stuck post using phpMyAdmin

I was attempting to change some leftover http:// references in the DB using Update/Set SQL statements. I was getting confident and started doing them in bulk and stopped noting exactly what I was ...
-2
votes
1answer
97 views

Submit cf7 form to cfdb as pdf/BLOB

I have a form created in CF7 with a signature field. I am also using CFDB. Rather than do the usual submit, I would like to capture the form as an image in a pdf and insert it into CFDB in a BLOB. I ...
0
votes
0answers
18 views

WordPress Stored Procedure - Commands out of sync, you can't run this command now

I'm having trouble trying to call a stored procedure for my WordPress plugin. I am receiving the following error: CALL category_GetName(3) Commands out of sync; you can't run this command now ...
0
votes
0answers
53 views

How to configure MySQL-SSL-Access to a MySQL Server 5.5 when a list of CIPHERS seems mandatory?

I have a MySQL 5.5 Server with SSL setup. I can connect with my MySQL user via command line from the webserver to the database server over TCP and verified the connection is encrypted. I figured out ...
0
votes
0answers
89 views

SQL Query for all posts in specific category

I try to add a custom field to all posts in specific category with a sql query. This query set meta_value of new meta_key as post_author value in ldn_posts table. Here is begin of the code (works for ...
0
votes
0answers
45 views

How to unwrap/separate Html tags in pages?

I have around 300 pages with some of them having wrong HTML formatting that I have to fix. I want to: Separate the H1 tag from the inner tags. Moving the TITLE (found in span) to H1. Get rid of the ...
0
votes
1answer
105 views

Error while importing database

A WordPress website is created and MySQL is the database for it. When tried to import the database to an empty database via Linux Command Shell we encountered below errors: ERROR 1146 (42S02): ...
0
votes
1answer
42 views

Accessing data from a non-WP database/table within a page content

I'm trying to convert a home built (PHP / MySQL) set of web pages to WP. I've installed the theme I want and have some basic pages working OK. However, I have a set of data within a MySQL database ...
0
votes
0answers
24 views

Database table not created without error

I have this code to run on activation to create the table $table_name = $wpdb->prefix . "codes" function code_install() { $sql = "CREATE TABLE IF NOT EXISTS " . $table_name . " ( id ...
0
votes
0answers
66 views

Send data from plugin to external database

I'm creating a plugin that I need write data to an external database (not the wp db that the plugin is on). I know I can use require_once with a separate config file with the external db details in ...
0
votes
2answers
47 views

Using wordpress function to retrieve data

I have been working on open source plugin and trying to add a new feature to it. For now I have been doing like this else if( $selected_report == "greport" ) { $sql = mysql_query( "SELECT ...
0
votes
0answers
19 views

wordpress query between zipcodes not working

Ok, I have this code that checks for zipcodes in the database, normally I can simply do a between query, but the zipcodes are stored in the following way: zip_code::2025 (meta_value in the usermeta ...
0
votes
0answers
84 views

Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error

This is a bug in my WP install that has crept up unknowingly; I can't say for sure when it began. To describe it: there were menus created in the Appearance -> Menus page early in the site's history, ...
1
vote
1answer
107 views

How to merge local and live databases?

We've been developing for Wordpress for several years and whilst our workflow has been upgraded at several points there's one thing that we've never solved... merging a local Wordpress database with a ...
0
votes
0answers
33 views

Best Way To Merge My Existing Custom User Database With WordPress?

I'm sure this has been asked before though I can't seem to find a clear answer or clear direction on how to handle this. I would appreciate a point in the right direction. I have an existing custom ...
0
votes
0answers
17 views

change data in mysql but don't change in admin

I have a problem, I have changed the content of my page in MySQL, but when I reopen the same page in the WordPress Admin panel, the content hasn't changed why is this? I'm using the interconnect ...
0
votes
1answer
44 views

Do I need to prepare query before get_results(), get_row() and get_var()?

I know that we don't need to use prepare($query) when we put it in insert() and update() because these functions sanitize data for us but I'm not sure if we need to prepare query before putting it in ...
-1
votes
1answer
51 views

SQL command to convert all tags in lowercase?

I'm looking for a SQL query command to convert every single tag in every post ever used to be converted into lowercase.
1
vote
1answer
132 views

What SQL / WordPress queries would need a nonce?

I'm a PHP / JavaScript developer and I'm new to WordPress. Our company's website is build upon WordPress. However I created many custom PHP pages without minding the WordPress framework much. When ...
1
vote
1answer
57 views

Custom Plugin For Converting CSV To MySQL

I wrote a plugin to add a csv file to the database. I created a custom table to use. My file path looks like this, wuno-uploader/wuno-uploader.php wuno-uploader/inventory.csv On an settings option ...
1
vote
0answers
67 views

Visual/Text Editor displays blank pages in WP-Admin- but HTML on client side displays correctly

Theme: Hemingway, Twenty-Sixteen Host: Bluehost Browser(s): Safari, Chrome OS: OSX El Capitan 10.10.5 (14F1605) Website When I try to "Edit Page" visual editor screen is blank, in both Text and ...
1
vote
1answer
25 views

Function causing the loop display posting more (empty)

By using the function: add_action( 'pre_get_posts', 'add_custom_post_types_to_loop' ); function add_custom_post_types_to_loop( $query ) { if ( is_home() && $query->is_main_query() ) { ...
1
vote
2answers
86 views

Create WP_Query to search for posts by their categories or their parent/child categories

Hello I am really sorry if this has been asked before but I couldn't find the exact solution I need. So here's the problem I want to create a search in my Wordpress page. Whenever a user submits the ...
1
vote
1answer
17 views

Is there a way to recover the table wp_term_relationships?

I'm trying to help a Non-Profit Organization with their site (which is built with Wordpress) that suddenly became "buggy"/odd: menus were missing, categories were empty, etc. I'm no expert around ...
1
vote
0answers
33 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 (118,117,116,...
1
vote
2answers
46 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 ...
1
vote
2answers
63 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, ...
1
vote
1answer
78 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
20 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
37 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
739 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
28 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
131 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
52 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
23 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 ...
-4
votes
1answer
147 views

How send simple push notification from php in android [closed]

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
34 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
66 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
68 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
114 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
115 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 ...