title: MYSQL LEFT(column, 100) and PHP {$row[(column)]}
body: <p>I have a mySQL table with a text field named "body" and a title field named "title".
  I want to choose the first 100 characters of the text field "body" by like this: </p>
  
  <pre><code>$query="SELECT title, LEFT(body, 100) FROM table";
  $result = mysql_query($query);
  </code></pre>
  
  <p>and then output the result in a web page:</p>
  
  <pre><code>while ($row = mysql_fetch_array($result)){
    echo "...html... {$row["title"]} ...html... {$row["body"]} ...html...";
  }
  </code></pre>
  
  <p>but I get an error: "Notice: Undefined index: body in C:\wamp\www\index.php on line 299"
  Can somebody help?
  Thanks.</p>