title: How can i query wordnet database(mysql) to get all Synonyms and similar of a word?
body: <p>I have used this code to get definitions:</p>
  
  <pre><code>//assuming you've connected to your MySQL db
  $word=$_GET['s']; //This variable stores the value given through url
  if (ctype_alpha($word)){ // If it's alphabetical
    $word_clean=mysql_real_escape_string($word); //Sanitize it for MySQL
  }else{
    //Not a valid word, error handle
    exit();
  }
  $query='SELECT wordno FROM word WHERE lemma=`$word_clean` LIMIT 1';
  $result=mysql_query($query);
  
  
  $query='SELECT synsetno FROM sense WHERE wordno=`$wordno`';
  
  
  $query='SELECT definition FROM synset WHERE synsetno=`$synset`';
  </code></pre>
  
  <p>BUT NOW I want to get synonyms and similar of that word ($word);</p>