jopereira Posted March 1, 2013 Share Posted March 1, 2013 $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 Link to comment https://forums.phpfreaks.com/topic/275091-warning-mysql_num_rows-expects-parameter-1-to-be-resource-boolean-given-in/ Share on other sites More sharing options...
jazzman1 Posted March 1, 2013 Share Posted March 1, 2013 Add mysql_error() and see the real error. For example: $rs = mysql_query($sql, $conn) or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/275091-warning-mysql_num_rows-expects-parameter-1-to-be-resource-boolean-given-in/#findComment-1415858 Share on other sites More sharing options...
jopereira Posted March 1, 2013 Author Share Posted March 1, 2013 d'oh.. it was a a field from the table i changed, i forgot to update there btw thx Link to comment https://forums.phpfreaks.com/topic/275091-warning-mysql_num_rows-expects-parameter-1-to-be-resource-boolean-given-in/#findComment-1415860 Share on other sites More sharing options...
AnyaMub Posted March 1, 2013 Share Posted March 1, 2013 Do gentlemen prefer blonde girls really?.. )) and what can we brunettes do??? I'm brunette and I'm gorgeous! or not?? __________ Added later more my pics and contacts here:hot-russian-girls.blogspot.com http://www.crazycelebsgossips.com/member.php?action=profile&uid=208592 http://www.nillabyte.com/member.php?6682-Anyahex http://www.dos.piib.org.pl/forum/profile.php?id=70481ic=146.new http://mazaforum.com/member.php?u=3474 Link to comment https://forums.phpfreaks.com/topic/275091-warning-mysql_num_rows-expects-parameter-1-to-be-resource-boolean-given-in/#findComment-1415875 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.