I keep getting a 500 with this
Its some thing to do with the
Becoz when i remove it theres no error can some one please help.
| Code: |
| if(!isset($_GET['cat'])){
$query = mysql_query("SELECT * FROM tutorials_categorys") or die(mysql_error()); if(mysql_num_rows($query) == 0) { echo "No tutorial categories currently!"; } else { $color1 = "#e8eef7"; $color2 = "#FFFFFF"; $row_count = 0; echo "<table width='550' border='0'> <tr> <td width='49%' bgcolor='#dddddd'>Category and Description </td> <td width='14%' bgcolor='#dddddd'># Tutorials</td> <td width='37%' bgcolor='#dddddd'>Latest Tutorial</td> </tr>"; while($row = mysql_fetch_array($query)) { $row_color = ($row_count % 2) ? $color1 : $color2; $id = $row[id]; $query = mysql_query("SELECT * FROM tutorials WHERE cat_id = '$id' AND is_validated = '1'") or die(mysql_error()); $nututs = mysql_num_rows($query); echo " <tr> <td bgcolor='$row_color'><b>$row[category]</b><br>$row[description]</td> <td bgcolor='$row_color'>$nututs</td> <td bgcolor='$row_color'> </td> </tr>"; $row_count++; } echo "</table>"; } |
Its some thing to do with the
| Code: |
| $nututs = mysql_num_rows($query); |
Becoz when i remove it theres no error can some one please help.
