Jump to content

kelloggs

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Contact Methods

  • MSN
    sahl@snaps.dk
  • Website URL
    http://www.sahlsa.dk

Profile Information

  • Gender
    Not Telling

kelloggs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ;D I was missing "extension=php_mysql.dll". Thx. for the help.
  2. I have installed Apache 2.058, PHP 5.1.4 and MySQL 5.0.22 on my windows server and everything seems to be running as it should, but there is one problem, when I use mysql_connect I get the error: Fatal error: Call to undefined function mysql_connect() in C:\web\test2.php on line 5 The code: [pre]<? $user="root"; $password="pass"; $database="phpbase"; mysql_connect(localhost,$user,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="select * from phptabel"; mysql_query($query); mysql_close(); ?>[/pre] If I do this it works: [pre]<? $mysqli = new mysqli('localhost','root','pass'); $mysqli->select_db('phpbase'); $result = $mysqli->query("SELECT * from phptabel"); while($row = $result->fetch_assoc()) { print $row['fornavn'] . ' ' . $row['efternavn'] . '<br/>'; } $result->close(); ?>[/pre] Why can I not use mysql_connect ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.