Re: error in script

2006-01-09 Thread Gleb Paharenko
Hello.



You should install MySQL support in PHP. See:

  http://dev.mysql.com/doc/refman/5.0/en/php-problems.html







Jon Miller wrote:

 I'm a newbie to MySQL so please bear with me.  I'm creating a program from =

 a script I found and I'm wondering why I keep getting the same error =

 message.

 I can connect to the mysql server while I'm ssh to the server, I also can =

 run phpmyadmin from my windows desktop and see the databases and create =

 databases, tables and input the data. =20

 I'm using Apache2, PHP4 and MySQL Ver 12.22 Distrib 4.0.24, for pc-linux-gn=

 u (i386)

 

 Thanks

 

 Jon

 

 Movie Database

 

 

 

 Fatal error:  Call to undefined function:  mysql_connect() in /var/www/test=

 5.php on line 8

 

 /var/www/test5.php:

 

 HTML

 BODY

 Movie DatabaseBR

 pre

 ?php

 // Connect to MySQL server

 // User name is root and password is blank

 $link =3D mysql_connect(192.168.2.16,mysql-username,mysql-password=

 );

 // Select the database

 $db =3D mysql_select_db(movie_library, $link);

 // Query the database for all fields from table 'movies'

 $result =3D mysql_query(SELECT * FROM movies, $link);

 

 // Loop through all the rows=20

 while ($row =3D mysql_fetch_object($result))

 {

 // print the object for each row

 print_r($row);

 }

 ?

 /pre

 /BODY

 /HTML

 

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



error in script

2006-01-08 Thread Jon Miller
I'm a newbie to MySQL so please bear with me.  I'm creating a program from a 
script I found and I'm wondering why I keep getting the same error message.
I can connect to the mysql server while I'm ssh to the server, I also can run 
phpmyadmin from my windows desktop and see the databases and create databases, 
tables and input the data.  
I'm using Apache2, PHP4 and MySQL Ver 12.22 Distrib 4.0.24, for pc-linux-gnu 
(i386)

Thanks

Jon

Movie Database



Fatal error:  Call to undefined function:  mysql_connect() in 
/var/www/test5.php on line 8

/var/www/test5.php:

HTML
BODY
Movie DatabaseBR
pre
?php
// Connect to MySQL server
// User name is root and password is blank
$link = mysql_connect(192.168.2.16,mysql-username,mysql-password);
// Select the database
$db = mysql_select_db(movie_library, $link);
// Query the database for all fields from table 'movies'
$result = mysql_query(SELECT * FROM movies, $link);

// Loop through all the rows 
while ($row = mysql_fetch_object($result))
{
// print the object for each row
print_r($row);
}
?
/pre
/BODY
/HTML


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]