Jump to content
  • Advertisement
Sign in to follow this  
ktiniatros

php-mysql newbie problem

This topic is 4600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, i try to write my first php-mysql script but the php functions for mysql dont work.I wrote <?php $link = msql_connect('localhost', 'user', 'password'); ?> and the result in the browser is: Fatal error: Call to undefined function: msql_connect() in c:\phpdev\www\untitled-1.php on line. All the php functions that dont have to do with mysql work fine.Mysql from command prompt works also fine.I connected and played a little typing commands. I have the phpdev installed for apache-php-mysql.

Share this post


Link to post
Share on other sites
Advertisement
You have to enable the mysql extension in php.ini. Look for the section called "Windows Extensions" and remove the semicolon in front of the line reading "extension=php_mysql.dll".
That said, you would be better off using the MySQLi extension.

[edit] And by the way, msql_connect() is not a MySQL extension function, it's an mSQL extension function. Change it to mysql_connect( ... )
[edit2] Also, I think you would have gotten more answers if you had posted in the Web Development forum. I'm sure a moderator can move this thread for you.


jfl.

[Edited by - jflanglois on December 18, 2005 2:51:53 PM]

Share this post


Link to post
Share on other sites
You could shun the MySQLi functions, and go straight to either:

PDO - which is standard from PHP 5.1 onwards

Or

PEAR::DB which has been around for years.

Both will allow you to do more advanced DB stuff in a non database-specific fashion.

Mark

Share this post


Link to post
Share on other sites
Quote:
Original post by markr
You could shun the MySQLi functions, and go straight to either:

PDO - which is standard from PHP 5.1 onwards

Or

PEAR::DB which has been around for years.

Both will allow you to do more advanced DB stuff in a non database-specific fashion.

Mark


Or ADOdb. I completely agree with markr on this point. I haven't tried PDO, I'll have to give it a shot.


jfl.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!