Results 1 to 4 of 4

Thread: Database connection with my sql

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Posts
    270

    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)
    {
    ?>

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Posts
    270

    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

  3. #3
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Posts
    270

    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
  •  



Click Here to Expand Forum to Full Width