Questions tagged as 'mysql'

3
answers

What is SQL injection and how can I avoid it?

I have found many questions in StackOverflow about web programs or forms that store information in a database (especially in PHP and MySQL) and that contain serious security problems related mainly to the SQL injection . Normally I leave a c...
asked by 20.05.2016 / 06:13
1
answer

Use CONCAT or CONCAT_WS in MySQL?

As we already know, MySQL has two functions to concatenate strings: CONCAT and CONCAT_WS . Responding to a question, I saw that CONCAT does not yield the expected results when at least one of the values equals NULL ....
asked by 13.07.2017 / 16:12
4
answers

Table relationships in MySQL

I have a big question about relationships in mysql. You see, I'm creating a site that looks like an e-commerce, it's for a colleague. I'm creating a table called categories and another one called subcategories . In the table subcategories...
asked by 19.07.2017 / 20:49
6
answers

MySQL - Use of AND & OR in the same query

I have a table like this one, which has two rows: nombre_per | apellido_per | permisos_busqueda_per -------------+----------------+---------------------- Mattew | Janeey | SI Janny | Pineda | NO My query is...
asked by 17.06.2016 / 13:55
3
answers

How to verify if two data intervals have shared elements?

A few days ago I saw a question that among other things implied a problem similar to the one I am going to raise, I wanted to do it in a more general way, because I understand that the well-thought-out solution could serve as a reference to simi...
asked by 03.08.2017 / 04:55
2
answers

Should I use a DateTime or TimeStamp type field in mySQL?

I must save dates and times in different tables of a typical transactional application where I will store varied information, such as: Dates and times at which each transaction occurs (Invoice, Payment Receipt, etc.) Dates and times of fut...
asked by 02.11.2015 / 16:27
1
answer

Problem with the "encoding": Characters correctly stored in MySQL appear "rare" in Java

Dear, I have a small problem with a Java application that I am writing. It is an application that connects via JDBC to MySQL. When saving the records, the characters are saved correctly (if I write "Mexico" in a JText box and send it to the d...
asked by 30.04.2016 / 18:02
1
answer

In MySQL it is possible to save a date and two hours in the same field or column?

This is a question of those that come to you when you are responding to situations raised here in Stackoverflow. Is there a possibility in MySQL to save a different date and two hours in the same field? That is, if I have this: Fecha i...
asked by 04.09.2017 / 21:35
2
answers

Obtain the first free or id id in mysql

I would like to know if there is any way to know the first free mysql record, but not the last, if not the first free that exists.    Ex:       I have a busy record 1,2,3,6,7,8,9   the first free would be 5 At the moment I have a code...
asked by 01.02.2017 / 20:37
3
answers

filter query with LIKE

I have to make a query to a database where I have a table of the data of people (name, address, colony, age, city, etc.) I want to obtain the addresses that necessarily have numbers, since I have some addresses where only the name of the street...
asked by 06.06.2016 / 20:07