Questions tagged as 'mysql'

3
answers

Single ID Generation with MySQL

I am using the code below for tests with a login system in PHP and MySQL. However, the nivel_usuario field generates a number from 0 to 2, and I would like it to generate a unique 6-digit ID containing numbers and letters (both uppercase...
asked by 21.07.2017 / 04:45
1
answer

Database does not work

I've never made a form, so please forgive me if you're absurdly wrong. Here is the bank with the table: CREATE DATABASE db_formacao; USE db_formacao; CREATE TABLE 'db_formacao'.'formacoes' ( 'ID' INT( 5 ) NOT NULL AUTO_INCREMENT , 'NOME'...
asked by 17.07.2017 / 15:31
1
answer

Error creating relationships in MySql using WampServer

I've set up the whole database and now I'm trying to make the relationships, when I click on the primary key (referential) and click on the foreign key, the following error appears: "Error: Relational characteristics are disabled!" HowdoIsolvet...
asked by 04.07.2017 / 15:01
1
answer

How to concatenate records in two columns? [duplicate]

Let's say I have a table with two columns first and last name, for example: Nome | Sobrenome -------+----------- João | Silva Mike | Corin Carlos | Rodrigues And I want to join the column of the name with the last name, to get the f...
asked by 13.09.2017 / 18:27
2
answers

Limit Result of Inner Join

I have a problem a few days ago. I have a select that does some inners and should return 3 lines, but one of the inners has several results linked to the result searched; how to limit to this inner get only the first result and select continue t...
asked by 08.08.2017 / 15:25
1
answer

Total records per day in the last 30 days [duplicate]

Galera, I just did this query, it works great until today (day 20) minus 19, only I need it to show the last 30 days. This works SELECT ID, DAY( created_at ) AS DIA, SUM( 1 ) AS HORAS FROM registration WHERE created_at BETWEEN CURREN...
asked by 20.06.2017 / 19:18
1
answer

Days countdown to a future event

A system that registers curricula, the curriculum is active for months after the registration date, which in my table is the variable $ row_curriculos ['created']; I was able to create the php that says the date that ends the registration....
asked by 19.06.2017 / 22:13
1
answer

Is it possible to connect to a MySql database without MySql.Data.dll?

Whenever I'm going to use a MySql database in a console application or windows forms, you need to have the dll MySql.Data.dll within the application folder. With this, I wonder if you have any way to use MySql without a dll. I thought...
asked by 20.08.2017 / 01:22
3
answers

Columns do not hit insertion

You're giving an error    Column count does not match value count at row 1     
asked by 20.08.2017 / 21:25
2
answers

Make a SQL query with codeigniter

I would like to pull some information from my database called " site ", inside it would connect to the table: " posts " and in it wanted to show information such as: id, updated, title, description, link, image "with a limit of 3 and fit into...
asked by 17.08.2017 / 14:56