Questions tagged as 'mysql'

2
answers

How can I verify if a certain MySQL database exists from Java?

I want to verify if my database exists before continuing with the execution of my program, but I do not know where to start, because I have looked at some examples and nothing has worked for me. This is the query that you want to throw: "SE...
asked by 16.10.2017 / 20:43
2
answers

error in MYSQL query

I'm doing a query which returns empty values when that column has data with those values, this is the query. select * from 'clase' where 'fk_id_familia' = 3 and 'fk_id_familia' = 6 and 'fk_id_familia' = 2 And these are the data that the...
asked by 27.10.2017 / 18:23
2
answers

Remove duplicates based on their date

I have a table called noarribados, it has the following structure, the fact is that I have several repeated records (varies the date and the status_bboo) I am interested in having only one (with the most recent_bboo status) I know that this is a...
asked by 19.04.2018 / 05:26
4
answers

Why does not a form save data in the database using PHP?

I am making a system to store data, very simply. The problem: when saving it says that the connection variable does not exist, despite being included in the php file, then it says that I keep it correctly, but it does not save anything in the...
asked by 17.01.2017 / 01:56
1
answer

Trigger "Triggers" Insert OR Update Mysql

My question concerns the creation of triggers in Mysql Currently create the following trigger: CREATE TRIGGER movimientotEquipo AFTER INSERT ON movimiento FOR EACH ROW IF EXISTS (SELECT * FROM equipo WHERE equipo.ide_af = NEW.af_id...
asked by 20.04.2017 / 21:53
1
answer

Improve performance by obtaining multiple Mysql records

I want to know what is the best way to get several records of a mysql database, I leave a simple example of my situation. I have a static method that queries a database and converts the result into an object that I have defined. class Persona...
asked by 01.03.2017 / 19:04
1
answer

Error while doing an SQL query

I have a small problem with a query, I am trying to add the amounts that exist in my table detalle_ventas, what I want to do is add the quantities that have the same product_id and the same expiration date. Example: id_producto | fecha_venc...
asked by 10.04.2017 / 14:52
2
answers

Query database by parts

I'm looking for a way to make my database show up in parts. That is, first the first 10 rows, by pressing a button, make a query with the other 10, and so on until the end. I have searched the internet and I have only found the LIMIT claus, whic...
asked by 12.09.2016 / 01:08
1
answer

PHP PDO Rollback does not work

Hi, I am trying to execute a PDO Rollback in a function where I involve several tables and there are several insert and updates. I am working with MVC and POO. Maybe I have something wrong with my structure, if so, could you tell me where...
asked by 31.08.2016 / 23:24
2
answers

Format Date in MySQL

My problem is that I want to add a date column in this format 2016-08-13 Exactly in this Order I achieve this: DATE_FORMAT(NOW(),'%y-%m-%d') but now I need the same format but adding 30 days something like that but I have no idea DATE_FO...
asked by 14.08.2016 / 01:14