Questions tagged as 'mysql'

2
answers

Random number in MySQL that does not repeat

I have the following problem. I need to make my select generate me randomly, but without being repeated. I have placed an expression in the order by , and yet it still repeats itself. Query: SELECT preguntas.* FROM preguntas...
asked by 02.05.2017 / 17:52
4
answers

Show records that are repeated every month

I have been working on a table in a database, which I need to show the clients that make at least one purchase every month. But until now I could not. I leave the table and the query as it should appear, so they can help me. PURCHASES tabl...
asked by 23.10.2018 / 18:35
1
answer

How to use the mysqli prepare function?

It happens that googling a bit to know how to improve the security of a web system and protect a little against sql injections I read that one of the best ways is to use PDO however I am more familiar with mysqli so I intend to use the funct...
asked by 27.10.2016 / 21:22
5
answers

MySQL to start with SQL?

I'm just starting with the SQL language, I've run simple code in openoffice base but now I need to learn more, I do not understand what I should download from the page link to be able to practice, what is the correct download option?     
asked by 07.06.2016 / 04:10
1
answer

Error inserting column without default value

good I have two tables a user and another type of user which are related I would like to save the data in java mysql netbeans that when entering the data in user they load me in type of user to give the level or privilege in the system I did an...
asked by 16.12.2017 / 03:02
2
answers

how to put mysql data in a table

<html lang="en"> <head> <title>Consultar Ausencias</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.boot...
asked by 01.03.2018 / 16:30
1
answer

Java + BD method that returns me the num. characters that are there [duplicated]

My problem is this, I have a BD and a Java application, we forgot the BD, let's focus on the App, I created a connection to a database that SI works, very all right. Now I propose to create a method in JAVA that returns an integer, the probl...
asked by 17.07.2017 / 15:53
2
answers

Help with these lines in mysql

Hello I need help with these lines gives me error and I do not know the reason. First the line: $registro = mysqli_query("SELECT * FROM productos WHERE nomb_prod LIKE '%$dato%' OR tipo_prod LIKE '%$dato%' ORDER BY id_prod ASC"); I get the f...
asked by 15.09.2016 / 16:24
3
answers

MySQL primary key [closed]

I want to do that when inserting a data block in a database, but that my Primary Key is the same for that data block, and it increases when it is finished inserting Any ideas?     
asked by 14.10.2016 / 23:12
1
answer

How can I create a random id in a table

I have always created tables with a id primary% autoincrementado and has not given me problems, but what interests me is having a id more difficult to remember and that does not take an order but does not allow duplicates. I have this...
asked by 14.02.2018 / 03:56