title: updating Sqlite table if string field starts with plus (+) sign?
body: <p>I have a sqlite table for my android application. This table has a String field (phone). When I want to insert or update a phone number starts with + plus-sign (e.g "+905331234567") then it ignores the plus sign. It writes only 905331234567.
  But when I modify the value with space (or any other except numeric) chars, 
  (eg." +905331234567"), then no problem. </p>
  
  <pre><code>update friend set phone = "+905331234567"; //905331234567
  update friend set phone = " +905331234567";// +905331234567
  </code></pre>
  
  <p>thanks for your reply.
  kemal.</p>
  
  <hr>
  
  <p><strong>Edit</strong></p>
  
  <p>Create String:</p>
  
  <pre><code>private static final String CREATE_FRIEND =  // create table 
          "create table " + FriendBean.DB_TABLE_NAME + "(" + 
          FriendBean.KEY_ROWID + " integer primary key autoincrement, " +
          FriendBean.KEY_contactID + " String, " +
          FriendBean.KEY_name + " String, " +
          FriendBean.KEY_phone + " String, " +
          FriendBean.KEY_accessCode + " String, " +
          FriendBean.KEY_flag + " int " +
          ");";
  </code></pre>
  
  <p>Insert method:</p>
  
  <pre><code>public void insertFriend(FriendBean bean) {
      SQLiteStatement statement = database.compileStatement(FriendBean.getInsertSQL());    
  
      statement.bindString(1,bean.getContactID());
      statement.bindString(2,bean.getName());
      statement.bindString(3,bean.getPhone() +"");
      statement.bindString(4,bean.getAccessCode());
      statement.bindLong(5,bean.getFlag());
  
      long id= statement.executeInsert();
  }
  </code></pre>
  
  <p>Class:</p>
  
  <pre><code>public class FriendBean{
  
      public static final String DB_TABLE_NAME = "friend";
  
      public static final String KEY_contactID = "contactID";
      public static final String KEY_name = "name";
      public static final String KEY_phone = "phone";
      public static final String KEY_accessCode = "accessCode";
      public static final String KEY_flag = "flag";
      ...
  </code></pre>
  
  <p>Solution: 
  <strong>String</strong> Fieldtype replaced with <strong>Text</strong>.</p>
  
  <p>references
  <a href="http://www.sqlite.org/datatype3.html" rel="nofollow">http://www.sqlite.org/datatype3.html</a>
  and
  comments.</p>