Questions tagged as 'mysql'

1
answer

Is there any incompatibility between the utf8 / 16 / 32_spanish_ci?

I find myself creating a database, but I am faced with a doubt that is the differences but I do not know if it affects the databases. I always use utf8_spanish_ci to create the database regarding the collate of it. But I noticed...
asked by 10.11.2016 / 13:04
1
answer

How to capture the id corresponding to the selected row from a Datatable?

I want to be able to capture the id corresponding to a row in my Server-side processing datatable , in order to delete and update the records, for now I only have the power to delete and it is that I am stuck in an error that when I...
asked by 01.06.2017 / 15:52
3
answers

How can I group 2 tables and count the number of rows?

Could someone help me how to group? I have this query, what I need is to group the amount by "condition" and by "group_program" that is to say I have this query: SELECT at_ce.condicion, gpr.grupo_programa FROM at_cons_externa at_ce INNER JO...
asked by 15.06.2016 / 00:31
2
answers

Mysql - How to add two fields with the same name, group them and count them?

Good morning, I hope you can help me with this query, I have this query: SELECT at_ce.condicion, COUNT(*) AS cantidad FROM at_cons_externa at_ce GROUP BY at_ce.condicion And as a result, it gives me this: What I need is to put toge...
asked by 16.06.2016 / 15:19
2
answers

problem in mysql nested query in php

I am making a nested query to the moodle database, because I am working with your data, the problem is that when making the nested query, it does not return anything, even the common result that the arrays return when there is nothing that is []...
asked by 28.05.2016 / 03:44
2
answers

Delete with inner join

Good I have a problem currently in my code, I'm working on a student registration system, where a representative can enroll several students, but if I delete a student I do not want the representative's data to be deleted because this may have a...
asked by 08.06.2016 / 01:52
2
answers

Undefined variable in a single view of laravel

good I find myself doing a library application in laravel at the time of making an individual view of the database using the driver show function I do it in the following way public function show($id) { $libros = Libro::find($id); if (...
asked by 14.02.2017 / 02:52
1
answer

Accumulate results of a COUNT

I have a product sales table with fields sales_id , date and product . This query: SELECT DAYOFYEAR(fecha),COUNT(*) as con FROM ventas WHERE YEAR(fecha)=2016 GROUP BY DAYOFYEAR(fecha) I get the following result: DAYOFYEAR(fecha) c...
asked by 24.07.2016 / 21:05
1
answer

How to pass a Java String to Javascript

It is a java web application project. I want to put a bookmark using google maps, I have my jsp where I show it and I have the javascript where I use the api. I have a java where I make the connection to the bd MySQL and another where I make the...
asked by 27.10.2016 / 02:12
2
answers

Select the values of a row only once when a certain value of a column is repeated

I have this table and I need to select certain rows only once, according to the three different values of the column "hours" that can be seen: Keep in mind that no will know the values of the hours column to make the query, then you c...
asked by 18.10.2016 / 23:36