Jump to content

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in


jopereira

Recommended Posts

$conn = mysql_connect("localhost", "root", "") or die("Impossivel conectar");

if($conn)
	{
		mysql_select_db("eventos", $conn);	
		} 
		$sql = "SELECT id, nome FROM utilizador";		
		$rs = mysql_query($sql, $conn);		
		//$num = mysql_num_rows($rs);
		if($num > 0)
		{
			//echo "<table border=0 cellpadding=0 cellspacing=0>\n";

			while($dados = mysql_fetch_array($rs))
			{
				$ref 	= $dados["id"];
				$nome 	= $dados["nome"];
			/*	$img = $dados["imagens"];
				echo"		<tr>";
				echo"		<td>$ref</td>";
				echo"		<td>$desc</td>";
				echo"		<td>$pvp</td>";
				echo"		<td>$func</td>";
				echo"		<td>$garant</td>";*/
			//	echo "<td>";

 

 

 

simplesmente não consigo desvendar o erro.. tenho a bd na pasta mysql/data e chama-se eventos

tem duas tabelas, utilizador e eventos

 

ajudem por favor

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.