Try inserting the following statements after each and
every mysql functions and see what is going on.
echo mysql_errno().": ".mysql_error()."<BR>";
Then, you should get a better indication of what is
actually going. I suspect that mysql_connect is
already failing to start with.
Regards,
Nat
----- Original Message -----
From: "Bert Goodman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 5:41 AM
Subject: [PHP-INST] php cgi install
OK, so I've gone ahead and done a fresh install of RH
7.0. I went and go the most recent versions of MySQL and
PHP that I could find. Here is what I did to configure both
of em:
MySQL is compiled first with:
configure --prefix=/usr/local/mysql
make
make install
Next PHP is tackled
configure --with-mysql=/usr/local/mysql
make
make install
I then do a mysql_install_db and then start the mysql
daemon.
All of these tasks seem to compete. I write a simple
script. Here is the whole thing:
#!/usr/local/bin/php -q
<?php
echo "Hello World\n";
mysql_connect("localhost","root");
mysql_select_db("ingram");
$result=mysql_queary("SELECT * FROM books WHERE ISBN
LIKE '0000%'");
echo "Title is: mysql_result($result,1,'TITLE');
?>
Everything works fine until I add the mysql_queary
statement. If I just have:
echo "Hello World\n";
mysql_connect("localhost","root");
mysql_select_db("ingram");
and run this I get no errors or warnings. Why can't I
queary my MySQL database? Can I not see the forsest for the
trees? ;-)
Any help would be greatly appreciated.
Bert Goodman
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]