Questions tagged as 'mysql'

1
answer

Create a query by checking two columns

I have a following table: tbl_missao id_misssao hostname status war_id commit_server_id When you create a mission, it can add that mission to itself or you can tell another user (warrior) to perform this mission. The logic is a...
asked by 05.12.2016 / 17:52
1
answer

Data mask

I am using a JFormattedTextField with the mask (##: ##) so that the user enters a time and my program searches the database returning the corresponding values at that time. My problem is that in the database the information is without the ":"...
asked by 03.12.2016 / 00:06
1
answer

SQLSTATE [42000]: Syntax error or access violation

SQL: "SELECT * FROM produto WHERE ($cliente=null OR cliente LIKE '%".$cliente."%') AND ($n_cad=NULL OR n_cad=$n_cad) AND ($cod=NULL OR id=$cod) AND ($dt_inicial=NULL OR data_emissao >= $dt_inicial) AND ($dt_final=NULL OR...
asked by 25.02.2017 / 17:47
2
answers

Problem when performing join on tables with generalization

I'm having trouble performing a JOIN on tables so the problem is this: In a bulletin board system, I have users, including students, school officials, and school employees. I need to generate an SQL statement that, when informing the CPF of t...
asked by 23.12.2016 / 03:33
2
answers

Return something in the query when there are no records

I'm making adjustments to a graphics system, basically there is a query in the database to bring values and popular the chart, but when there is no specific record does not return anything from the database and the graph breaks. I would like...
asked by 23.01.2017 / 18:30
2
answers

How to give an INSERT of primary keys of an X table in a table Y

Hello, well, I'm having a hard time giving insert to the table, and I have two FK's that link the person table. My question is: How do I get the desired PK's and insert them as FK's? Split table: create table divida( codigo_divida int(5) pr...
asked by 05.11.2016 / 14:01
1
answer

Problem with date insertion in php mysql

I have a table of loans with the fields data_emprestimo and data_prazo , I want to be able to insert the current date in the and a deadline in the data_prazo table by adding 7 days of data_emprestimo .     
asked by 08.03.2017 / 14:48
1
answer

How would this PHP be converted to mysqli instead of mysql? [duplicate]

I need urgently the following PHP that was built in msql is written in mysqli it is part of an application in which I am developing I have no knowledge in PHP I have already broken my head after a conversion and I did not find much help. T...
asked by 15.11.2016 / 05:05
1
answer

How to connect Mysql in Visual Studio 2015?

I have Visual Studio 2015, I created a project and I want to connect three databases in it (Firebird, Paradox and MySql), initially MySql . I created a new project like this: C# > Windows > Classic Desktop > Windows Form Aplicatio...
asked by 17.11.2016 / 13:36
1
answer

How to insert data in the database (mysql) received from an HTML form separated by commas?

Good evening, I'm going to receive information from a TEXTAREA html, and I need to get this in PHP and insert this information in the bank, how can I do that? The information comes from TEXTAREA as follows: 0001, Student A, 10, 10, 20 000...
asked by 14.11.2016 / 00:01