[PHP-DB] Re: mysql_connect() and phpmyadmin

2002-02-19 Thread Goldpoint

Dear Martin,

Why don't you try this :

?
$link = mysql_connect(localhost,phpcoder_dk,pdw );
if (!$link) {
 print(Connection fail);
 exit();
 }else{
  if (!mysql_select_db(phpcoder_dk,$link)) {
  print(Error);
  exit();
}else{
$query = SELECT * FROM hits;
$result = mysql_query($query,$link);
}
 }
?

Please note that the IP address for localhost is 127.0.0.0 not 127.0.0.10.

Regards,

Noppanan Arunvongse Na Ayudhaya

Martin Allan Jensen [EMAIL PROTECTED] wrote in message
005901c1b40d$6143c390$040a@IceSystems">news:005901c1b40d$6143c390$040a@IceSystems...
I just don't understand why phpmyadmin works with it when i can't call
it.! I did try with localhost
but it won't still work..

PLEASE help i just can't understand it

Kind regards
Martin



-Original Message-
From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 10:44 AM
To: Rick Emery
Subject: Re: [PHP-DB] mysql_connect()


It wasen't me hwo did it! but why do phpmyadmin work fine then??



Martin
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 5:29 PM
Subject: RE: [PHP-DB] mysql_connect()


 Re-read my previous email.  You do not have mysql functionality compiled
 into PHP and you web server.  The clue is the phrase undefined function:
 mysql_connect().
 How did you load PHP, MYSQL, etc?

 -Original Message-
 From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 12, 2002 10:26 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] mysql_connect()


 Sorry folks, last time i wrote it to fast! Well here is the hole
 story

 We got an organisation to install a new version of phpmyadmin, mySQL and
PHP
 4.0.6 on our Cobalt Raq 4r server (Linux)

 They got it installed and phpmyadmin is working finebut when i call
fro
 a script souch as
 %
 ?
 // Connecting, selecting database
 $link = mysql_connect(127.0.0.10, phpcoder_dk, pdw)
 or die(Could not connect);
 print Connected successfully;
 mysql_select_db(phpcoder_dk)
 or die(Could not select database);

 // Performing SQL query
 $query = SELECT * FROM hits;
 $result = mysql_query($query)
 or die(Query failed);
 ?
 %

 The script writes this.
 %
 Fatal error: Call to undefined function: mysql_connect() in
 /home/sites/site2/web/sql.php on line 3
 %

 You can test it at http://www.phpcoder.dk/sql.php

 I really hope that someone will help me cause i really can't find the
 problem by myself...!

 Kind regards
 Martin Allan Jensen

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: mysql_connect() and phpmyadmin

2002-02-13 Thread Raymond Lilleodegard

Hi Martin!

I dont think I understood your question right here.
Are you trying to connect to mysql ?

regards Raymond

Martin Allan Jensen [EMAIL PROTECTED] wrote in message
005901c1b40d$6143c390$040a@IceSystems">news:005901c1b40d$6143c390$040a@IceSystems...
I just don't understand why phpmyadmin works with it when i can't call
it.! I did try with localhost
but it won't still work..

PLEASE help i just can't understand it

Kind regards
Martin



-Original Message-
From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 10:44 AM
To: Rick Emery
Subject: Re: [PHP-DB] mysql_connect()


It wasen't me hwo did it! but why do phpmyadmin work fine then??



Martin
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 5:29 PM
Subject: RE: [PHP-DB] mysql_connect()


 Re-read my previous email.  You do not have mysql functionality compiled
 into PHP and you web server.  The clue is the phrase undefined function:
 mysql_connect().
 How did you load PHP, MYSQL, etc?

 -Original Message-
 From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 12, 2002 10:26 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] mysql_connect()


 Sorry folks, last time i wrote it to fast! Well here is the hole
 story

 We got an organisation to install a new version of phpmyadmin, mySQL and
PHP
 4.0.6 on our Cobalt Raq 4r server (Linux)

 They got it installed and phpmyadmin is working finebut when i call
fro
 a script souch as
 %
 ?
 // Connecting, selecting database
 $link = mysql_connect(127.0.0.10, phpcoder_dk, pdw)
 or die(Could not connect);
 print Connected successfully;
 mysql_select_db(phpcoder_dk)
 or die(Could not select database);

 // Performing SQL query
 $query = SELECT * FROM hits;
 $result = mysql_query($query)
 or die(Query failed);
 ?
 %

 The script writes this.
 %
 Fatal error: Call to undefined function: mysql_connect() in
 /home/sites/site2/web/sql.php on line 3
 %

 You can test it at http://www.phpcoder.dk/sql.php

 I really hope that someone will help me cause i really can't find the
 problem by myself...!

 Kind regards
 Martin Allan Jensen

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php