Solved

mysql_db_query is deprecated

Posted on 2001-08-25
3
729 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 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
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 look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

726 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