Questions tagged as 'mysql'

1
answer

PDO eliminates duplicate SQL fields

Good luck, I'm using PDO to run my querys . SQL: SELECT Pessoa.IdPessoa, Pessoa.IdPessoa, Pessoa.Nome AS 'Nome', Pessoa.DataNascimento AS 'Nascimento' FROM Pessoa WHERE Pessoa.EstadoCivil = '1' When I run this sql for example, whic...
asked by 08.05.2018 / 22:52
1
answer

Return values if any records do not exist

I have the tables: tabelaUm [id] [nome] 1 nome1 2 nome2 tabelaDois [id] [idTabelaUm] [nome] 1 1 nome1 1 1 nome2 1 1 nome3 1 2 nome4 1 2 nome5 1 2 nome6...
asked by 03.05.2018 / 04:31
3
answers

How to do PHP and MySQL pagination?

I want to make a pagination on my blog. I will not have 50 posts on the first page, so I want to limit the page to the last 15 posts added and then clicking the "older posts" button will show me the oldest posts. In the background I do not want...
asked by 23.07.2014 / 16:14
0
answers

Relationship with LoopBack does not generate Foreign Key

I'm having a problem that is after creating the Models, and doing the autigrap / autoupdate, everything works fine for the creation of Schema in the data bank. The problem is with Foreign Key. Within it, after defining the relationship, every...
asked by 26.04.2018 / 22:56
0
answers

Java: Generating Report in iReport Between Two Dates Timestamp

I am finalizing a small system made in Java and MySQL and with reports being generated by iReport and need to generate a report displaying values between two dates. In MySQL the query is working perfectly: DirectoniReportisalsoworkin...
asked by 04.05.2018 / 20:46
1
answer

Can not add foreign key constraint! however syntax and pks are correct

I'm trying to create an FK for a table, I do not understand syntax error, but TOAD returns me the message that FK can not create. The tables are created in the database, and the PKs are right. ALTER TABLE minsarh.perguntas ADD CONSTRAINT fk_pe...
asked by 25.04.2018 / 18:32
1
answer

Querying a date between two dates [duplicate]

You needed to check if a particular date is contained within a date range. Being more specific, in a system that we have control of vehicles, when we receive a fine, we need to identify the driver who was with a particular vehicle on the day i...
asked by 24.04.2018 / 03:15
0
answers

How to update in a table using mysql c # and a method?

Is it possible to use a method or class that uses table fields to do an update on this table? For example: update record field 1 with f (record field2), record field1 with f (record2 field2), etc ... reg|campo1|campo2 1 f(x) x 2 f...
asked by 23.04.2018 / 15:50
3
answers

How to display part of a text stored in a TEXT column?

My table has a TEXT field where I enter text with paragraphs that are read through the nl2br function of PHP. I print each column of the table through mysql_fetch_array and everything is displayed correctly: $res2 = mys...
asked by 16.04.2014 / 17:12
0
answers

Android connection with MySQL - Error with POST method

Good evening! I'm developing a simple interface in Android Studio for login and user registration. I followed the steps of a YouTube tutorial and almost everything works perfectly, I'm just having trouble trying to log in. Button code Login:...
asked by 28.04.2018 / 01:28