1,105,644 Community Members

Deprecated: Function mysql_db_query()

Member Avatar
swebdizajn
Newbie Poster
15 posts since Mar 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I have a problem at login to the site:

Constantly message appears:

Deprecated: Function mysql_db_query() is deprecated in /home/vebsajt/public_html/hosting/config/functions.php on line 53

Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in /home/vebsajt/public_html/hosting/config/functions.php on line 53

the file in line 53 functions is:

$check_login = mysql_db_query($db, "SELECT * FROM table_logins where session='$my_session' and type='client'", $connection);
-------------------------------------------------------------------------

Where might be a mistake?

Thank you very much!

Member Avatar
hericles
Veteran Poster
1,078 posts since Nov 2007
Reputation Points: 98 [?]
Q&As Helped to Solve: 232 [?]
Skill Endorsements: 14 [?]
Featured
 
0
 

The mistake is quite clear. That function is deprecated (out of date, no longer supported) and you should use mysql_query() as the message states.

Member Avatar
swebdizajn
Newbie Poster
15 posts since Mar 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

The mistake is quite clear. That function is deprecated (out of date, no longer supported) and you should use mysql_query() as the message states.

Yes, I did so:

Instead mysql_db_query () I put mysql_query () but now reported another error:

Warning: mysql_query () expects at most 2 parameters, 3 given in / home /...

We also do not see any more fields to login.

Member Avatar
pritaeas
mod_pritaeas
11,315 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 155 [?]
Moderator
Featured
Sponsor
 
0
 

If you have a look at the documentation you'll see that your first parameter ($db) should be removed.

Member Avatar
swebdizajn
Newbie Poster
15 posts since Mar 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

If you have a look at the documentation you'll see that your first parameter ($db) should be removed.

Throughout the functions.php file, the more lines of code is

$ check_login = mysql_db_query ($ db, "SELECT * FROM table_logins where session = '$ my_session' and type = 'client'", $ connection);

When you change the mysql_query ("SELECT * FROM table_logins where
session = '$ my_session' and type = 'client' ", $ connection);

Coming now to more problems because they lose the login fields and visit the site to see logout, when you do leads to a new error:

Deprecated: Function mysql_db_query () is deprecated in / home / website / public_html / hosting / client / login.php on line 15

When you change the login.php file and data connection (instead of mysql_db_query>> mysql_query) then the login page error appears:

ERROR MESSAGE

YOU MUST RUN THE FILE FIRST install.php

Thus, only changes mysql_query () seems to be the happiest solution, although only temporarily solves the error alert but not an error.

Member Avatar
hericles
Veteran Poster
1,078 posts since Nov 2007
Reputation Points: 98 [?]
Q&As Helped to Solve: 232 [?]
Skill Endorsements: 14 [?]
Featured
 
0
 

YOU MUST RUN THE FILE FIRST install.php

Are you using Drupal?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: