|
-
Jun 1st, 2009, 12:53 AM
#1
Thread Starter
Hyperactive Member
Database connection with my sql
i m getting an error like this
Fatal error: Call to undefined function mysql_connect() in ..........\leftpanel.PHP on line 3
i m using mysql-version-5.0.45-win32 and php version is PHP Version 5.2.6
and sql yog version is 4.01
here is the code snippt
Code:
<?
$dbh=mysql_connect ('localhost','root','root');
mysql_select_db ("class");
$result=mysql_query("select * from `class`.`maincategory` order by
maincatname");
$EOF=mysql_num_rows($result);
if($EOF > 0)
{
?>
-
Jun 1st, 2009, 01:05 AM
#2
Thread Starter
Hyperactive Member
Re: Database connection with my sql
by googling one the net i find that uncommenting the line extension=php_mysql.dll will solve the problem but unfortunately the i m still getting an error
-
Jun 1st, 2009, 02:02 AM
#3
Re: Database connection with my sql
you need libmysql.dll to be in c:\windows\system32\. this file can be found in the directory PHP is installed to.
-
Jun 1st, 2009, 04:05 AM
#4
Thread Starter
Hyperactive Member
Re: Database connection with my sql
i have already copied file ,and also add php_mysql.dll in system 32 folder ,but problem is still there
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|