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

PHP forms
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


<< Previous Page
PHP eregi_replace()
Next Page >>
PHP Errors to Display


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];
}
?>




<< Previous Page
PHP eregi_replace()
Next Page >>
PHP Errors to Display



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

3219. PHP if, else and elseif Statements, php tutorial
PHP if, else and elseif Statements php tutorial
https://www.agernic.com/php-tutorial/php-if-else-and-elseif-statements.html

3217. PHP Data Types, php tutorial
PHP Data Types php tutorial
https://www.agernic.com/php-tutorial/php-data-types.html

3347. PHP Array - What is an Array?, php tutorial
PHP Array - What is an Array? php tutorial
https://www.agernic.com/php-tutorial/php-array-what-is-an-array.html

3225. PHP Variables, php tutorial
PHP Variables php tutorial
https://www.agernic.com/php-tutorial/php-variables.html

3360. PHP Introduction
PHP tutorial - Introduction.
https://www.quackit.com/php/tutorial/php_introduction.cfm

3216. PHP 5 Constants, php tutorial
PHP 5 Constants php tutorial
https://www.agernic.com/php-tutorial/php-constants.html

Your add here
PHP lcfirst() function

PHP similar_text() function

PHP strlen() function

PHP print() function

PHP htmlentities() function

PHP strstr() function

PHP substr() function

PHP strip_tags() function

PHP define() function

PHP explode() function

PHP strtolower() function

PHP html_entity_decode() function

PHP ucwords() function

PHP md5() function

PHP str_repeat() function

PHP rtrim() function

SQL like syntax and example
How do I get PHP errors to display - PHP error_reporting()
HTML Headings, examples
CSS rounded corners
HTML Image Size
PHP Function, Creating PHP Function - how? - example