I am new to MySQL and am using Paul DuBois's book to MySQL guide me. (Great
Book!)
I am attempting to use PHP, My scripts always connect to the MySQL server OK,
and the Databases to, but my queries always fail with the following message:
OK 1 OK 2
Parse error: parse error in /home/httpd/html/test10.php3 on line 8
(I place the OK 1 etc to help me find problems)
This is the PHP3 script
<?php
$link = mysql_pconnect ("localhost", "test", "test")
or die ("Could not connect");
print ("OK 1 ");
mysql_select_db ("samp_db")
or die ("Could not select database");
print ("OK 2 ")
$query = "SELECT COUNT(*) FROM president";
$result = mysql_query ($query)
or die ("Query failed");
Print ("OK 3 ")
?>
Using PHP I can create drop databases all OK but every query I've tried gives
me a parse error and I've looked trough all my books and can't find any
mention of what they are and how you fix them.
Thanks
Mike
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php