Questions tagged as 'mysql'

0
answers

Delete records with mysql loop

I have a database with 8 tables and I have to delete all the records of those tables with a single instruction but without affecting the structure of the tables in the database, I have heard that with a loop it is possible but the truth I'm not...
asked by 28.11.2018 / 23:46
0
answers

Possible PHP Error when trying to access a website by CMS Joomla

(first of all I would appreciate any type of edition in title or context since everything related to this is not conceptualized since I barely have a month of experience in these subjects) Since last Thursday I have been trying to see my webs...
asked by 29.11.2018 / 11:29
1
answer

Problem in Select dates and amounts

Boys I have a problem that I have not been able to solve This is my query to the bd SELECT DATE_FORMAT( date, '%c' ) AS fecha, SUM( COALESCE( grand_total, 0 )) as total FROM sma_sales WHERE DATE_FORMAT(date, '%Y') = '2018' AND customer_id =...
asked by 04.12.2018 / 13:27
0
answers

MySQL inserts in an integer field like "0" when putting "null"

I need to insert " null " in an integer field and when I give the order it saves it as 0 . Can someone explain to me what happens? INSERT INTO tabla (id, campo) VALUES (1, null) I have tried with and without quotes, with unde...
asked by 30.11.2018 / 00:47
0
answers

WARN: Establishing SSL connection without server's identity verification is not recommended

When I try to make a clausala update in java with the following code: Statement comando=null; try { comando = db.conn.createStatement(); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } //Syst...
asked by 30.11.2018 / 00:57
0
answers

Calculate the difference between hours in MYSQL

I HAVE 2 FIELD TIME START AND END TIME DOES NOT CALCULATE WELL TIME SELECT a.codprogramacion AS mensaje FROM 'programacion' a JOIN dias b ON a.'iddia' = b.codigodia join gestion c on a.idgestion = c.codigogestion JOIN horario d ON a.idhorario...
asked by 26.11.2018 / 16:19
0
answers

Show image stored in MySQL with PHP

I have a file that allows me to make modifications to a MySQL registry which includes adding an image. When I try to send the data to another file to make a PDF I do not recognize the image, it recognizes the path "images / imag1.png".    Thi...
asked by 27.11.2018 / 06:02
0
answers

Relate tables with PHPGenerator and MySQL foreign key

I'm doing a database to keep track of orders digitally. I have a table cliente , with three columns: IDcliente , Nombre (varchar) and Código (integer). The second table, Registros is composed of several Col...
asked by 26.11.2018 / 10:17
0
answers

An sql event can be conditioned

I have this event CREATE DEFINER='root'@'localhot' EVENT 'prueba' ON SCHEDULE EVERY 1 YEAR STARTS '2018-11-23 16:35:00.000000' ON COMPLETION PRESERVE ENABLE DO UPDATE cat_marca as tabla_c SET tabla_c.precio = (SELECT tabla_c.precio * tabla...
asked by 23.11.2018 / 22:34
0
answers

My program does not insert data in Mariadb

import java.nio.channels.SelectableChannel; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; i...
asked by 23.11.2018 / 23:14