?
Solved

mysql_db_query is deprecated

Posted on 2001-08-25
3
Medium Priority
?
745 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
heddesheimer earned 200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
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 …
Suggested Courses

770 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