title: SQLlite db creating table error
body: <p>Hello i am working on a project in Android with SQLite.
  I'm trying to created a db that (at the moment) has three tables : (TABLE_DR_TYPE,  TABLE_DR_TITLE, TABLE_USERS) I keep getting this error  in logcat when creating table USERS. Any help please?</p>
  
  <pre><code>    //TABLE DR TYPE
  private static final String TABLE_DR_TYPE = "table_doctor_type";
  private static final String DR_TYPE_COLUMN_ID = "id";
  private static final String DR_TYPE_COLUMN_DR_TYPE = "dr_type";
  
  // TABLE DOCTOR_TITLE
  private static final String TABLE_DR_TITLE = "table_doctor_title";
  private static final String DR_TITLE_COLUMN_ID = "id";
  private static final String DR_TITLE_COLUMN_DR_TITLE = "dr_title";
  
  // TABLE USERS
  private static final String TABLE_USERS = "users";
  private static final String COLUMN_ID = "id";
  private static final String COLUMN_NAME = "name";
  private static final String COLUMN_SURNAME = "surname";
  private static final String COLUMN_TITLE = "title_id"; // FK
  private static final String COLUMN_DR_TYPE= "type_id"; // FK
  private static final String COLUMN_PIN= "pin";
  private static final String COLUMN_EMAIL= "email";
  private static final String COLUMN_TEL= "telephone";
  
  //CREATE TABLEs
  
  private static final String CREATE_TABLE_DR_TYPE = "CREATE TABLE "
          + TABLE_DR_TYPE + "("
          + DR_TYPE_COLUMN_ID + " integer primary key, "
          + DR_TYPE_COLUMN_DR_TYPE + " text not null);";
  
  private static final String CREATE_TABLE_DR_TITLE= "CREATE TABLE "
          + TABLE_DR_TITLE + "("
          + DR_TITLE_COLUMN_ID + " integer primary key, "
          + DR_TITLE_COLUMN_DR_TITLE + " text not null);";
  
  
  private static final String CREATE_TABLE_USER = "CREATE TABLE "
          + TABLE_USERS + " ("
          + COLUMN_ID + " integer primary key autoincrement, "
          + COLUMN_NAME + " text not null, "
          + COLUMN_SURNAME + " text not null, "
          + COLUMN_TITLE + " integer, "
          + " FOREIGN KEY ("+COLUMN_TITLE+") REFERENCES "+TABLE_DR_TITLE+"("+DR_TITLE_COLUMN_ID+"), "
          + COLUMN_DR_TYPE + " integer, "
          + " FOREIGN KEY ("+COLUMN_DR_TYPE+") REFERENCES "+TABLE_DR_TYPE+"("+DR_TYPE_COLUMN_ID+"), "
          + COLUMN_PIN + " text not null, "
          + COLUMN_EMAIL + " text not null, "
          + COLUMN_TEL + " text not null);";
  
  @Override
  public void onCreate(SQLiteDatabase db) {
      System.out.println("Kreiram bazu");
      db.execSQL("PRAGMA foreign_keys=ON");
      db.execSQL(CREATE_TABLE_DR_TYPE);
      db.execSQL(CREATE_TABLE_DR_TITLE);
      db.execSQL(CREATE_TABLE_USER);
      this.db = db;
  }
  </code></pre>
  
  <p>logcat: </p>
  
  <pre><code>   Caused by: android.database.sqlite.SQLiteException: near "type_id": syntax error (code 1): , while compiling: CREATE TABLE users (id integer primary key autoincrement, name text not null, surname text not null, title_id integer,  FOREIGN KEY (title_id) REFERENCES table_doctor_title(id), type_id integer,  FOREIGN KEY (type_id) REFERENCES table_doctor_type(id), pin text not null, email text not null, telephone text not null);
  </code></pre>