I think the LIMIT clause has to come last in the query. Also, variables only get interpolated within a quoted string if it uses double quotes (as opposed to single quotes). Therefore, your mysql_query() is probably returning false instead of a resource ID. Try using the following pattern to help debug any SQL errors:
$sql = "SELECT * FROM `notes` WHERE id=$id LIMIT 0, 30";
$result = mysql_query($sql) or die("Query failed ($sql): " . mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo $row["note"];
}