Questions tagged as 'db'

1
answer

Grant value byte in a set

We have a DB with a User table that has a column of type Tinyint (Since it is a boolean) and we are working with Hibernate. My User model has a variable, autogenerated, Byte type to designate that user value (setters & getters). The fact is t...
asked by 20.04.2018 / 10:24
1
answer

How do I consult in a table from a column "json" the rows that contain only one data in that column?

I have a table as follows: CREATE TABLE partes( id INTEGER PRIMARY KEY, id_padre INTEGER, tipos JSON ); I insert the sample data: INSERT INTO partes (id, id_padre, tipos) VALUES (1, 0, '["1","2"]'), (2, 1, '["2"]'), (3, 1, '["2","1"]...
asked by 13.07.2017 / 20:35
1
answer

How to use the LIKE with a DATE_FORMAT?

I have a query where I need to do a LIKE in WHERE indicating the current date. It's this: SELECT orden FROM tareas WHERE tipo = "Dos" AND (fechaCierre IS NULL OR fechaCierre LIKE DATE_FORMAT(NOW(), '%Y-%m-%d')) Of course,...
asked by 19.10.2018 / 11:00
2
answers

Delete an item from ListView and DB SQLite with OnItemLongClickListener

I'm trying to delete items from a ListView by keeping the click, which works but when I go out and go back into the activity, I reappear the items I deleted. I think this happens because I do not delete the element also from the Data Base,...
asked by 21.12.2018 / 14:04
1
answer

SQLITE problem when creating a table with two Foreign Key

I'm doing a project on Android with a table structure. But it turns out that the db does not create it correctly and I can not see what happens. It is about 4 tables with their relations between them, it lets me create the three fir...
asked by 16.10.2018 / 12:22
1
answer

Problem when using the Foreign key and references

Hello, how I have a problem using the FOREIGN KEY and REFERENCES with MySQL Workbench according to the dubugger is a syntax error CREATE TABLE IF NOT EXISTS pedidos( id_pedido INT NOT NULL auto_increment, fecha_pedido DATE, cantidad_p...
asked by 26.12.2018 / 22:54
1
answer

how to make a mysqli function for a search engine?

I want to make a contact search engine of those who are your friends only and not others as well as whatsapp does but I do not know how to make a SQL table to make the query.    I passed this code but it does not work for me example: $SQL_...
asked by 22.06.2018 / 23:32
1
answer

Problem, "My application has stopped" - "SQLiteException: no such table"

I have created an App to consult the address of a person by placing its name in an EditText, for the database I used the BD Browser program for SQlite, create a folder called assets and place the .db file there. The application opens in the emul...
asked by 13.12.2018 / 21:02
1
answer

How to show the existing username in a database with jQuery AJAX?

You could say that I am "new" in this php language and mysql queries, since you are developing a website, practically Social Network, which is centralized in hosting photos by users, that is, each registered user has the opportunity to upload yo...
asked by 22.11.2018 / 17:45
0
answers

yii problems with my dependent menu

I have problems to make a menu dependent, the problem I have is that it only takes the data from one menu and the other takes all the values by default. This is the function of my controller: public function actionAjaxResultados(){...
asked by 02.04.2018 / 14:24