Before I get in trouble, I have searched extensively for this one, in the
PHP Docs, online etc.
I have a simple page:
<?php
$un="jim";
$pw="jim";
$db="localhost";
$link = mysql_connect($db,$un,$pw) or die("Could not connect: " .
mysql_error());
$sql2 = "SELECT * FROM eib.book ORDER BY bookid";
$op = mysql_query($sql2) ;
$num= mysql_numrows($op);
?>
When I run the page I keep getting this error:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result
resource in C:\Program Files\Apache
Group\Apache2\htdocs\eib\php\itemadd2.php on line 34
I can't work out why?
The code looks fine to me.
Thanks
Jim
http://jimpix.co.uk