Derek Hill
Lurker
Im a new programmer to the android scene and im having trouble trying to create the table read from it and write to it.
I have experience with how PHP works and i know how to query but i am having trouble trying to understand how its created and the code behind it.
https://developer.android.com/training/basics/data-storage/databases.html
i went through this and i dont even understand it at all.
For example sake lets use this example query...
Creating Table
CREATE TestDB;
Creating Table
CREATE TABLE `TestDB`.`TestTable` ( `id` INT(10) NOT NULL AUTO_INCREMENT ,`user` VARCHAR(30) NOT NULL , `pass` VARCHAR(30) NOT NULL , `rank`ENUM('User','Admin','Owner') NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
Pulling Info
SELECT * FROM TestTable WHERE id='1';
Update Info
UPDATE TestTable SET user=$user WHERE id='1';
These are queries i normally would use for php.
Could someone help me clarify how to translate this into android code?
I have experience with how PHP works and i know how to query but i am having trouble trying to understand how its created and the code behind it.
https://developer.android.com/training/basics/data-storage/databases.html
i went through this and i dont even understand it at all.
For example sake lets use this example query...
Creating Table
CREATE TestDB;
Creating Table
CREATE TABLE `TestDB`.`TestTable` ( `id` INT(10) NOT NULL AUTO_INCREMENT ,`user` VARCHAR(30) NOT NULL , `pass` VARCHAR(30) NOT NULL , `rank`ENUM('User','Admin','Owner') NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;
Pulling Info
SELECT * FROM TestTable WHERE id='1';
Update Info
UPDATE TestTable SET user=$user WHERE id='1';
These are queries i normally would use for php.
Could someone help me clarify how to translate this into android code?