HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
HTML Tutorial

CSS Tutorial

mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in - How to fix



mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/..../..


Example: How to fix.
<?php
$result = mysql_query("select keyword_ID, keyword from ".$mysql_table_prefix."keywords");
echo mysql_error();
while($row=mysql_fetch_array($result)) {
$all_keywords[addslashes($row[1])] = $row[0];
}
?>

how to solve it?
Alternatives to this function mysql_query() use: mysqli_query() as much:

Example: use mysqli_query()
<?php
$result = mysqli_query($link, "select keyword_ID, keyword from ".$mysql_table_prefix."keywords");
echo mysqli_connect_error();
while($row=mysqli_fetch_array($result)) {
$all_keywords[addslashes($row[1])] = $row[0];
}
?>




mysql_query Mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in - php tutorial

1287. PHP INTRODUCTION
php tutorials and introduction. What is php and how to write php
https://www.plus2net.com/php_tutorial/php_introduction.php

3211. Online PHP Tutorial pdf, what is php, PHP MYSQL Online Courses, Classes, Training
Online PHP Tutorial pdf, what is php, PHP MYSQL Online Courses, Classes, Training, PHP Tutorials for Beginners - agernic.com is a free interactive PHP tutorial.
https://www.agernic.com/php-tutorial.html

2254. PHP Tutorial - Variables
PHP variables are just a name for a value and you can simply use it like this $var_name = value;. They usually store sting caracters and numeric values for later use in the programming block.
https://tutorialehtml.com/en/php-tutorial-variables/

3352. PHP Database Driven Website
Use PHP to create a database driven website with this PHP tutorial.
https://www.quackit.com/php/tutorial/php_database_driven_website.cfm

1938. PHP String Functions, php tutorial
PHP String Functions php tutorial
http://www.agernic.com/php-tutorial/php-string-functions.html

3357. PHP If Statements
Learn about PHP If statements with this PHP tutorial.
https://www.quackit.com/php/tutorial/php_if_statements.cfm

Your add here
How to get PHP errors to display?
How to prevent sql injection in php mysqli
How do I get PHP errors to display - PHP error_reporting()
mysql_query(): The mysql extension is deprecated and will be removed i
Function eregi_replace() is deprecated in php - How to fix
PHP delete an element from an array
Uncaught Error: Call to undefined function MYSQL_NUM_ROWS() in
Deprecated: mysql_connect() mysql extension is deprecated and will be
mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean g
SQL IN Operator - example
SQL BETWEEN Operator
SQL like syntax and example
SQL WHERE AND & OR multiple conditions
SQL create table primary key autoincrement
PHP mysqli_connect () Function
SQL COUNT(), AVG() and SUM() Functions
Display data from SQL database with MySQLi into php - html table
SQL CREATE DATABASE - example
SQL mysql order by columns, by date, by asc, by desc, random with PHP
PHP mysqli_query() Function - mysqli query
SQL delete row - SQL delete table
SQL update - SQL update select
Insert into SQL - Insert into table SQL - Insert data in sql
Login in PHP - simple login script with PHP MYSQL