Commit a0e1f704 authored by christopher.foster's avatar christopher.foster

updated queries, still non functional

parent a6fe9c6f
......@@ -23,7 +23,7 @@ public class DBConnector extends SQLiteOpenHelper {
@Override
public void onCreate (SQLiteDatabase db)
{
String CREATE_table = "CREATE TABLE " + TABLE_Users + "(" + COLUMN_ID + "INTEGER PRIMARY KEY," + COLUMN_Name + "TEXT," + COLUMN_UserName + "TEXT," + COLUMN_Password + "INTEGER" + ")";
String CREATE_table = "CREATE TABLE " + TABLE_Users + "(" + COLUMN_ID + "INTEGER PRIMARY KEY, " + COLUMN_Name + " TEXT, " + COLUMN_UserName + " TEXT, " + COLUMN_Password + " INTEGER " + ")";
db.execSQL(CREATE_table);
}
......@@ -48,7 +48,7 @@ public class DBConnector extends SQLiteOpenHelper {
{
boolean correct = false;
String query = "Select * FROM" + TABLE_Users + "= \"" + username + "\"";
String query = "Select * FROM " + TABLE_Users + " = \"" + username + "\"";
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(query, null);
......@@ -72,7 +72,7 @@ public class DBConnector extends SQLiteOpenHelper {
public String finduser(String username)
{
String string = null;
String query = "Select * FROM" + TABLE_Users + "WHERE" + COLUMN_UserName + "= \"" + username + "\"";
String query = "Select * FROM " + TABLE_Users + " WHERE " + COLUMN_UserName + " = \"" + username + "\"";
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(query, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment