is that in mysql admin I can add data but from my app inventor I can't if I don't put an id manually, besides that column appears in a label and it's the same query but not in the tableview
Show your create table statement and a screenshot of your INSERT INTO query
Taifun
Cita
CREATE TABLEtabla_usuarios
(
id
int(11) NOT NULL AUTO_INCREMENT,
usuario
varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
clave
varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
nombre
varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
apellido
varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
correo
varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
telefono
varchar(12) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (id
)
) ENGINE=MyISAM AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
and query is "Insert into tabla_usuaros VALUES ('id', 'usuario', 'clave', 'nombre', 'apellido', 'correo', 'telefono')
It is activated and it is not ordered when it has 7 columns
Sorry, I meant untick
If you want your results ordered then you will have to add that to your query: ORDER BY "Column"
Use only
Insert into tabla_usuaros('usuario', 'clave', 'nombre', 'apellido', 'correo', 'telefono') VALUES ('usuario', 'clave', 'nombre', 'apellido', 'correo', 'telefono')
without the id
Taifun
i can't fix this D:
Show us the Do it result of your query and provide the result content without splitting it into different labels so we can read the error message...
use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
The query looks correct for me... and according to MariaDB Insert Into + Examples - MariaDBTips.com it is also correct for MariaDB...
Have you been able to execute a simple INSERT INTO statement successfully, probably into another table? You might want to setup a simple table as test, see the previous link with some examples...
You could try to remove the single quotes of the column names and try again...
Taifun
You now checked the solution marker...
Do you want to tell us, the problem was in the php script you used previously?
Taifun
Yes, the problem was my PHP and I ended up using "App Inventor Tutorials and Examples: MySQL | Pura Vida Apps" and it helped me a lot to solve several things, in the future I will make a tutorial based on my experience with mysql.php
Btw. Let me recommend you to never store passwords in plain text in your database... this is sensitive information... store its hash values instead... my tools extension offers a method for that...
Taifun
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.