Solved

mysql_db_query is deprecated

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…

831 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