A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

Untitled - mcpaste

Untitled

Von anonymous, 8 Jahre vorher, geschrieben in Plain Text, aufgerufen 1'548 mal.
URL https://mcpaste.de/view/b5009e9f Einbetten
Paste herunterladen oder Rohtext anzeigen
  1. import android.content.Context;
  2. import android.database.sqlite.SQLiteDatabase;
  3. import android.database.sqlite.SQLiteOpenHelper;
  4.  
  5. public class DBHelper  extends SQLiteOpenHelper {
  6.     //version number to upgrade database version
  7.     //each time if you Add, Edit table, you need to change the
  8.     //version number.
  9.     private static final int DATABASE_VERSION = 4;
  10.  
  11.     // Database Name
  12.     private static final String DATABASE_NAME = "crud.db";
  13.  
  14.     public DBHelper(Context context ) {
  15.         super(context, DATABASE_NAME, null, DATABASE_VERSION);
  16.     }
  17.  
  18.     @Override
  19.     public void onCreate(SQLiteDatabase db) {
  20.         //All necessary tables you like to create will create here
  21.  
  22.         String CREATE_TABLE_STUDENT = "CREATE TABLE " + Student.TABLE  + "("
  23.                 + Student.KEY_ID  + " INTEGER PRIMARY KEY AUTOINCREMENT ,"
  24.                 + Student.KEY_name + " TEXT, "
  25.                 + Student.KEY_age + " INTEGER, "
  26.                 + Student.KEY_email + " TEXT )";
  27.  
  28.         db.execSQL(CREATE_TABLE_STUDENT);
  29.  
  30.     }
  31.  
  32.     @Override
  33.     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
  34.         // Drop older table if existed, all data will be gone!!!
  35.         db.execSQL("DROP TABLE IF EXISTS " + Student.TABLE);
  36.  
  37.         // Create tables again
  38.         onCreate(db);
  39.  
  40.     }
  41.  

Antwort auf "Untitled"

Hier kannst Du auf den Paste von oben antworten

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876