title: How to know that if a Insert query was succesfull in anorm?
body: <p>I am using Anorm for database queries in my Play application. I went through some tutorials it is given that <code>SQL(....).execute()</code> returns <code>Boolean</code> if execution was succesful. I tested the method but it always returned <code>false</code>(don't know when it returns true:/ ). I also tried <code>SQL(...).executeInsert()</code> but there is not any 'auto-increment' column in the table, so the problem still exists. Please help me if there is any solution(any expanded version of the '.execute()' method or other) with anyone.</p>
  
  <p>Here is a part of my code which is failing due to unexpected return...</p>
  
  <pre><code>    def addSuggestion(sessionId: BigInteger, suggestionId: BigInteger) = {
          DB.withConnection { implicit c =&gt;
            if (!SQL("insert into user_suggestion_" + sessionId + " values (" + suggestionId + ",1,0,0)").execute()) {
              SQL("update user_suggestion_" + sessionId + " set count=(count+1) where user_id=" + suggestionId).executeUpdate()
            }
          }
        }
  </code></pre>
  
  <p>The update query should run only when the insertion fails(due to any constraint etc.).  Is there any other function/alternative? Please help. Thanks in advance. </p>