Solved

mysql_db_query is deprecated

Posted on 2001-08-25
3
704 Views
Last Modified: 2006-11-17
Anyone ever see this error before?

Warning: mysql_db_query is deprecated; use mysql_select_db() and mysql_query() instead in c:\inetpub\wwwroot\phpmyadmin\sql.php on line 56

It started after I updated to PHP4.
0
Comment
Question by:steveyoder
3 Comments
 
LVL 4

Accepted Solution

by:
heddesheimer earned 50 total points
ID: 6425185
The error tells you what you should do. Since PHP 4.0.6 you should not use mysql_db_query. You should replace this:

$link = mysql_open(...);
$result = mysql_db_query ($database_name, $query ,$link);

with this:

if ( mysql_select_db ($database_name ,$link);
{
  $result = mysql_query($query);
}

Marian
0
 
LVL 5

Expert Comment

by:LornaJane
ID: 9758244
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
accept comment from heddesheimer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

LornaJane
EE Cleanup Volunteer
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question