There are a few solutions to your problem.
The way with MySQLi would be like this:
<?php $connection = mysqli_connect('localhost', 'username', 'password', 'database');
To run database queries is also simple and nearly identical with the old way:
<?php // Old way mysql_query('CREATE TEMPORARY TABLE `table`', $connection); // New way mysqli_query($connection, 'CREATE TEMPORARY TABLE `table`');
Turn off all deprecated warnings including them from mysql_*:
<?php error_reporting(E_ALL ^ E_DEPRECATED);
The Exact file and line location which needs to be replaced is “/System/Startup.php > line: 2 ” error_reporting(E_All); replace with error_reporting(E_ALL ^ E_DEPRECATED);
Related Posts:
- Undefined function mysql_connect()
- MySQL column count doesn’t match value count at row 1 [closed]
- Uncaught Error: Call to undefined function mysql_escape_string()
- dbDelta support for FOREIGN KEY
- is it possible to run some php code within a wordpress page?
- How to correctly submit a search form and display the result in an independent page
- How to use update and delete query in wordpress
- How to implement WP_List_Table? WP_List_Table giving array instead of a value in listing table
- Does WordPress cache get_user_meta() results?
- Using Echo in ShortCode – Stuck
- MySQL query performed 4 times inside loop
- Show only one post for each author ( Page loads too slow )
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- Install will not load: PHP does not have MYSQL installed
- Insert post without actions/hooks
- Import 10,000 Users into WordPress WITH a specific ID for each user
- Modern Tribe Calendar wp-query with meta query not working at all
- WP database error for comments_popup_link()
- No wp-config.php file on local install of wordpress – site still displays
- Use ajax to update_post_meta
- How to get the post_id from postmeta
- Insert all post IDs in new database table
- Is the outdated PHP mysql extension a requirement for WordPress 4.6?
- What SQL / WordPress queries would need a nonce?
- Different database query in function.php using mysqli
- Custom Plugin For Converting CSV To MySQL
- Why is variable not working on custom sql query using wpdb?
- Get WooCommerce product details and transfer them to a custom DB table
- Checking for new message using AJAX and PHP. Server overload?
- How can I export posts with featured images, without download them
- How to securely provide a $_POST var in WP_Query with PHP 7?
- Create WP_Query to search for posts by their categories or their parent/child categories
- What is a valid parent for get_terms()?
- WSoD being caused by this piece of code
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- Update results, Before deleting the related category [closed]
- Sum the total amount of a specific product purchased per user and display in table
- Replacing mysql_escape_string in a custom plugin when moving to PHP7
- Weird 404 URL Problem – domain name being placed at end of urls
- database sent to a JSON file
- $wpdb->wp_users returning empty value for
- $wpdb->insert() does not Insert record in a table
- WordPress SQL injection
- multiple where condition in result query
- Grouping posts by a custom meta value
- Mixing variables into an array when inserting values
- wpdb prepare insert table doesn’t work
- Make a database query using WordPress
- Force Users To Relogin
- I can’t update my data through $wpdb
- A $_POST should occur when submit form but is not?
- Output: “Array”
- Using wordpress function to retrieve data
- Live search from database table
- form $_post action value gets truncated after it passes through two forms
- Adding data to custom wordpress database table
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- Add row to custom database Table and delete all rows older than 1 day
- making php value numeric
- populate select options from extra mysql table data
- How to create Loop code for Menu using WordPress?
- How to WP_Query posts order by parent title?
- How to store checkbox data for individual users?
- Convert a column of a table containing an Array as response in HTML
- Please help! I have a problem with getting wordpress databas
- How to run complex query using PHP
- Error establishing a database connection (Set-up locally)
- Conditional formatting on data fetched from MYSQL
- Can I split a huge wp_postmeta table across different databases or servers?
- how to get data from two different table from wordpress database
- I can’t separate the array by commas
- Passing Current User ID into SQL statement
- How to insert multiple rows and columns in database using array
- WordPress mysql deos not work with php7
- Error inserting into custom table – Object of class wpdb could not be converted to string [closed]
- Windows Setup: Error establishing a database connection
- WP + MySql db / PHP
- The plugin generated 225 characters of unexpected output during activation
- WAMP SERVER Command Prompt SET PATH=%PATH%
- append data to mysql table via submit button coded in php – not working
- WordPress select query issue
- How to do a MySql query in WordPress?
- How can get all users by current user meta (array)?
- Add two or multiple functions in WordPress Post or Page
- Send data from plugin to external database
- Processing forms with php to wordpress database
- How to set max users to 17.000
- directorypress theme error mysql_error() [closed]
- How to set up an auto delete post?
- How to connect database table to each registered wordpress user.
- Using the same shortcode to show any table from the database
- Cannot Upload Custom Header Image into WordPress Dashboard
- Predefine Magazine Style Layouts
- I am unable to fetch json data from wp_db
- Parse error: syntax error, unexpected ‘}’ in C:\xampp\htdocs\admin\products.php on line 148 [closed]
- How to send push notification in android using php? [closed]
- How to get a database field value from a WordPress table? [closed]
- Error resetting database index using ALTER TABLE in $wpdb->query
- Can’t insert into a database wordpress