title: Display SQL query results in php
body: <p>I'm tring to diplay results in php from sql database 
  MySQL statement is correct and does what i want in phpMyAdmin but for some reason my code breaks in the webpage </p>
  
  <p>here is the code </p>
  
  <pre><code>require_once('db.php');  
  $sql="SELECT * FROM  modul1open WHERE idM1O&gt;=(SELECT FLOOR( MAX( idM1O ) * RAND( ) )  FROM  modul1open) 
  ORDER BY idM1O LIMIT 1"
  
  $result = mysql_query($sql);
  echo [$result];
  </code></pre>
  
  <ul>
  <li><a href="http://araven666.deviantart.com/art/Result-416868698?ga_submit_new=10%253A1385816546" rel="noreferrer">and here is what i get</a></li>
  </ul>
  
  <p>In general I need random number limited from min to max by the table id </p>