Fatal error: Call to undefined function mysql_pconnect()

I am having a problem that my DB didnt recognize the auth type so I had to upgrade my version of PHP. Now I get the error..

Fatal error: Call to undefined function mysql_pconnect() in C:\wwwroot\results.php on line 22

Here is line 22

$db = mysql_pconnect("localhost", "root", "root","books");

Before I upgraded PHP versions I was getting a connection request to the DB but it didnt recognize the authentication type.
LVL 3
trathAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gamebitsCommented:
$db = mysql_pconnect("localhost", "root", "root","books");

You have one to many argument, I'm assuming books is the name of the db it is not required to connect to the sql server: mysql_pconnect(localhost, username, password);

use: mysql_select_db (db name) to connect to a specific db.

And thanks for the points and the grade in the other question.

Gamebits
akshah123Commented:
The reason you are getting fatal error for mysql_pconnect() function is probably because you do not have mysql support enabled in your php.  To enable mysql, go to php.ini file located under c:\windows\ folder.  In that file, uncomment

;extension=php_mysql.dll

line.  i.e. take out ';' from the beginning of the line.

One way to check if you have mysql enabled, is user phpinfo() function to echo all the settings of php and see if there is a section on mysql.
trathAuthor Commented:
OK I give up. I am tired of spending hours trying to get PHP to work. I doubt that it even actually does anything, its just a false hope put out there to disturb us programmers. Everytime I try anything the error changes so I give up. I want to get professional on-line trining I will give the points to someone who points me in the right direction.
gamebitsCommented:
I'm sorry that you have so much problem, you have to give yourself some times learnig a new language take times.

For the online training see here:

http://www.zend.com/store/education/online-training/zend-online-training-courses.php

Gamebits

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
trathAuthor Commented:
I had already found Zend and I think that is who I am going to go with. Again thanks for alll yor help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.