Questions tagged as 'mysql'

2
answers

How to satisfy two conditions at the same time

Good afternoon, suppose I have a list of students with the list of subjects they passed, and I want to select the name of those who passed math and language, if I do: SELECT nombreAlumno FROM alumno WHERE aprobo = matematica AND aprobo = lengu...
asked by 17.08.2016 / 20:55
1
answer

sum of a column with a mysql trigger

I need your help since I'm not good at triggering (TRIGGER) in creating a trigger what happens that I have two tables one that is "player" and the other "team" as they are in the image In the player table I have a stored process that ma...
asked by 16.05.2016 / 04:14
1
answer

How to count record, with multiple conditions

I am trying to make a query in MySQL, I have a table that contains the following: table: id, ano, m1, m2, m3, m4, m5, m6, m7 data: 10, 2016, I, P, L, I, L, P, I That is, what I want to achieve is...
asked by 19.08.2016 / 15:19
4
answers

Trigger with MySQL query

What I need to do is the following, when a record is entered into the orders table, a trigger is made to perform the following query: SELECT timestampdiff(MINUTE, fechaDeSolicitud, now()) <= 120 FROM pedidos WHERE idPedido= (aqui iria el...
asked by 23.05.2016 / 04:44
2
answers

Is there an equivalent to lastInsertId () for an UPDATE?

I am using PHP and MySQL with PDO; I would like if there is an equivalent to the lastInsertId () method that returns the last ID of a row that has been inserted, but that returns the last ID of a row that was updated.     
asked by 25.05.2016 / 23:33
1
answer

Error Code: 1265. Data truncated for column 'Record_id' at row 1 0.109 sec

I have the "registry" table defined in this way in my database: create table registro( Id_registro int not null auto_increment, fecha date, financiero int not null, clientes int not null, procesos_internos int not null...
asked by 25.05.2016 / 03:54
1
answer

Error showing an image with JSON on Android

How about, I'm trying to show images in a ImageView from a database mysql on Android. It shows me the following: org.json.JSONException: Value <html><body><script of type java.lang.String cannot be converted to JSONO...
asked by 10.05.2016 / 19:05
3
answers

Balance in real time in a query depending on a column

To be clear, this is in a MySQL consula I need to solve the following: In column "A" I have a string of characters, in "B" and in "C" I have numerical values. Column "D" has to reflect the calculation of "B" minus "C" as long as "A" has the s...
asked by 29.04.2016 / 19:17
2
answers

How to update a MySQL database using php and Javascript?

I have a page like the one above. It is assumed that if I give new, in the upper part to the left, let me create a new user with your name, phone, email, etc. If I give the zafacon I should delete the entire line of my page and my database...
asked by 29.04.2016 / 04:37
2
answers

Add an "id" to an element created in PHP

I'm starting with PHP and I have a doubt, maybe a little basic, but the truth is that I can not solve it. What I'm trying to do is create something like a traffic light where the images are changed every so often, depending on the color they hav...
asked by 06.11.2016 / 02:05