Questions tagged as 'mysql'

2
answers

Consultation with ajax is not done and it does not give me an error

I'm starting with ajax. I have an input that generates a search with ajax in my mysql database, but it does not return any results and the console does not show any error $(document).ready(function() { $("#resultadoBusqueda").html('...
asked by 28.12.2018 / 12:07
1
answer

get variable with js and send them by ajax

I have some links that I create from a database; I go through all the registers and the samples. Now I need to send the id of recurso of which the button is being pressed, through AJAX to know with what recurso I am working....
asked by 07.12.2018 / 01:56
1
answer

Join 2 mysql queries to get a common result

I have this query: SELECT DISTINCT * FROM ( SELECT meses.id, meses.nombre_mes, count(asignacion.fecha_envio) AS cantidad, SUM(hijos.valor) AS valor, year(asignacion.fecha_envio) AS ano FROM meses left join asignacion ON meses.id = MONTH(asig...
asked by 03.01.2019 / 01:03
2
answers

I have a problem with closing connections to MSYQL using JAVA.

After executing a prepareStatement my connection to the database is closed and it does not let me continue executing sentences. I throw the exception: java.sql.SQLNonTransientConnectionException: No operations allowed after connecti...
asked by 07.11.2018 / 16:56
2
answers

Two Foreign Keys to the Same Field?

I have the doubt if it is valid to create rest tnego this table: CREATE TABLE EQUIPO( id_equipo int not null, nombre varchar(45), encargado varchar (45), tel_encargado varchar(8), PRIMARY KEY (id_equipo) ); and I need to...
asked by 07.11.2018 / 17:19
1
answer

How to add a summed and grouped mysql query to a table

What I need is that in a table I show the sum of a field that is grouped: $sql = "SELECT SUM(cantidad) AS cnt FROM produccion group by producto "; <!-- Tabla donde se listará la consulta --> <table class="table...
asked by 08.11.2018 / 20:31
2
answers

formulate query to show data

As I do so that in my table I throw the invoices that went to credit and cash since if I put an and in the query does not throw data to me because to say on a date there is only credit and in the query I ask both credit and counted data and I do...
asked by 31.10.2018 / 17:56
1
answer

I would like you to help me with this error: mysqli_num_rows () expectsparameter1tobemysqli_result, boolean given

<?php $alert=""; if (!empty($_POST)) { if (empty($_POST['usuario']) || empty($_POST['contraseña'])) { $alert="Ingrese su usuario y su clave"; }else{ require_once "conexion.php"; $user = $_P...
asked by 02.11.2018 / 01:16
1
answer

Problem with Java and MYSQL login

Today I come with you because I had a problem with a login I'm doing in Java with a connection to BD MYSQL. My class connection: public class Conexion { Connection conectar = null; public Connection conexion(){ try {...
asked by 19.10.2018 / 04:31
1
answer

The subquery returned more than one row

Hello, I have this problem with a query DELIMITER // CREATE TRIGGER pagos AFTER INSERT ON Pagos FOR EACH ROW BEGIN SET @puesto = (SELECT e.puesto FROM Empleado AS e, Pagos AS p WHERE e.idEmpleado=p.Empleado_idEmpleado); IF @puesto='Administra...
asked by 19.11.2018 / 20:21