Outputting query turning

<!doctype html>
<html>
 
  <head>
    <meta charset="UTF-8">
    <title>test09</title>
  </head>

<body>

<?php
$connect=mysql_connect("localhost","root","*******");

$mysql=mysql_select_db("php02",$connect);

$query="select say from adText where [COLOR="Red"]n=1 or n=2[/COLOR]";

$sql = mysql_query($query);

$rows = mysql_fetch_assoc($sql);

echo $rows['say'].'<br>';

?>

</body>
</html>

I have the code above at http://dot.kr/x-test/09.php .
I am expecting to output two values “myText1” for n=1 and “myText2” for n=2 .
But it produces only the first value “myText1.”

You need a while loop to output everything:

while($row = mysql_fetch_assoc($sql)) {
  echo $row['say'];
}

You should really look at the manual to understand functions like mysql_fetch_assoc. Normally the manual can answer most of your questions.