It should work... The only other thing I would personally change is to concatenate the variable in the WHERE clause...
$sql = "SELECT category.*, newproject_data.*, projectdata_details.* FROM category, newproject_data, projectdata_details WHERE category.catID='".$new_cats[$i]."' AND projectdata_details.projID=newproject_data.detailID AND newproject_data.nprojectID=newproject_data.nprojectID ORDER BY category.importance ASC";
but that shouldn't be a factor... Are you certain the category.importance field exists? What happens if you just do a simple query like "SELECT * FROM category ORDER by importance ASC"? Does it sort properly then?