Hello,
I have this weird output "Resource id #2" when I browse the file with the code that is below. It is strange, because this code DID work on another server. Does anybody know what I'm doing wrong or how I should re-configure my PHP or MySql?
Thanks. Here is the code
<body>
<?
include("db.inc.php");
mysql_connect($server,$username,$password);
@mysql_select_db($database) or die(mysql_error());
$query = "SELECT * FROM solas_rel WHERE $methode LIKE '$keyword%' ORDER BY achternaam ASC";
$result = mysql_query($query);
echo "debug $result";
$num = mysql_numrows($result);
mysql_close();
if ($num == 0) {
echo "Geen resultaten gevonden.";
}
if ($num > 0) {
include("rel_zoek_result.php");
}
?>
Here is the output:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /Users/stijn/Sites/solas/rel_zoek_do.php on line 18