Questions tagged as 'mysql'

1
answer

Problems in narrowing MySQL query

I have a table where one of the columns I use to know which users are subscribed to a thread of a forum. This column filled with the user names. For example, the content may be as follows: Paco; Pepe; Laura; If for example I want to find al...
asked by 07.07.2017 / 13:50
2
answers

Get all records without repeating id

I want to make a query to get all the data from my table, but without the idPrincipal being repeated, but getting the others idPrincipal that is, in my table I have the field id auto increment idPrincipal idFinal sent msg the idPrincipal...
asked by 14.07.2017 / 17:02
2
answers

Style a field with the text of a news item

I have a table called news with the typical fields: title, date, text, image1, etc. In the box box, to expand this the news field is a single big paragraph and when I want to publish the news it looks as coarse as it is. What do you recomm...
asked by 19.06.2017 / 11:00
1
answer

mysql - check if a select query is greater than 0

Hi, I'm creating a stored procedure for user registration. My stored procedure: delimiter // drop procedure if exists sp_insertar_usuario; create procedure sp_insertar_usuario ( in idpersona int, in usuario varchar(20), in pass varchar(45), in...
asked by 14.06.2017 / 19:22
3
answers

Validate Java records if there is or not

I need to know how to validate whether or not there is a record in a database. This is the search code (there is no error in itself): public void buscar(String id_usu) { try { conectar conexion = new conectar();...
asked by 13.06.2017 / 05:47
1
answer

HELP! I'm trying to update a table and send error

Try to update the score field in my dashboard but send me an error:    code: 1093 You can not specify target table 'partitioned' for update in   FROM clause I leave my sentence use noble; update dpartida set score=1 where id...
asked by 22.05.2017 / 00:47
1
answer

How to Delete Time From A Datatime In Query LINQ In C #?

I'm consulting a database of Mysql and I want to show the result in DatagridView my problem is that I display the date with the time and I just need the date I tried with .ToString("dd/MM/yyyy") and .ToShortDateString() but it...
asked by 07.12.2018 / 15:24
1
answer

Error 150 create table sql

When creating the following table I get error 150: "Foreign key constraint is incorrectly formed" create table seproduce ( año_s INT NOT NULL, mes_s varchar(30) NOT NULL, dia_s INT NOT NULL, id_producto I...
asked by 25.05.2017 / 02:28
1
answer

Create query without repeating column value

I am trying to make a query in which a value is not repeated since it is repeated several times. In my database, I have these data: How can I generate a query so that the value of emitter is not repeated? For example, do not repeat the...
asked by 29.06.2017 / 02:53
2
answers

How to add 2 columns per calendar in MySQL

I have the following table: I want to do the sum of sueldo1 and sueldo 2 , use SUM(); but that makes me add the two columns but in all the calendars. Is there any way to do the sum of both columns but by calendar?...
asked by 15.05.2017 / 21:32