Warning: mysqli_num_rows() expects exactly 1 parameter, 2 given | mysql |mysqli
问题 i have code like this in mysql_query , works fine. but i moving all the code to mysqli_ its throw error like in the title mysql $count = mysql_query("SELECT COUNT(*) FROM xxx limit 2") or die(mysql_error()); $count = mysql_result($count,0); for($i=0; $i<$count;$i++){ echo '<li data-target="#transition-timer-carousel" data-slide-to="'.$i.'"'; if($i==0){ echo 'class="active"'; } echo '></li>'; } mysqli $count = mysqli_query($con,"SELECT COUNT(*) FROM xxx limit 2") or die(mysqli_error()); $count