Menu

MySQL?

Help
2003-07-06
2003-07-10
  • Pelle Wessman

    Pelle Wessman - 2003-07-06

    It is veru easy too start using dev-php with just php. But I wonder if you can't get it as easy to start with MySQL? My site needs both and without MySQL the only thing I see is "Can't connect"

     
    • Chris

      Chris - 2003-07-10

      Have you seen the example code included with dev-php? Just clic with the right button in the text area then examples>connect to MySQL.

      Maybe you have to check the name of your database, password, etc. You can check why you cannot connect to the db using this code (I modified the original one from dev-php):

      $dbhost = "localhost"; // The host where your database is
      $dbname = "database";  // Your database name
      $dbuser = "root";      // The user name
      $dbpass = "password";  // The user's password

      $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Error because of:".mysql_error());
      mysql_select_db($dbname, $connect);

      I hope this help you

       

Log in to post a comment.

MongoDB Logo MongoDB