Questions tagged as 'mysql'

1
answer

How to set the password field in the database

When registering in the system the user will have to confirm the password to register, however I do not know how to proceed and if this is done with some function in PHP or some kind of validation. My question is also if I need to create in my t...
asked by 07.03.2018 / 02:12
3
answers

Group by age group

Good evening, I have to group and count how many employees I have with gender and age group. Follow the html code <div class="card" style="margin-top: 5%;"> <div class="card-header text-center"> Quantificação de...
asked by 21.12.2018 / 03:02
2
answers

How to check if the email is already registered in the database?

The Controller is always returning the error message when the email is registered in the database. [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "Id,Nome,Email,Senha")] Pessoas pessoas) { if (pessoas != n...
asked by 26.10.2018 / 18:29
2
answers

Show higher value and name

I have the following code: <?php $consulta = mysql_fetch_assoc(mysql_query('SELECT MAX(pontos) FROM usuarios')); echo intval($consulta['MAX(pontos)']); ?> However, it only displays the highest value, I wanted it to displa...
asked by 11.12.2018 / 14:59
2
answers

Error trying to DELETE with INNER JOIN in MYSQL

DELETE FROM 'tb_users' INNER JOIN 'tb_marker' ON tb_users.id_users' = 'tb_marker.id_users' WHERE 'tb_users.id_users' = 12 Here is the error:    You have an error in your SQL syntax; 'INNER JOIN' tb_marker 'on' tb_users.id_users' = 'tb_m...
asked by 19.04.2017 / 21:47
2
answers

How to remove accent values in MySQL

How can I remove the accent of all values from a column / field using MySQL commands? Attempt : UPDATE tabela SET campo = REPLACE(campo ,'Á','A'), campo = REPLACE(campo ,'À','A'), . . . campo = REPLACE(campo ,'Ç','C')     
asked by 07.03.2017 / 19:47
2
answers

Add values returned from while

I have a table that has the value column, I query those values as follows $sql2 = 'SELECT * FROM comisao_trabalho WHERE idJob="10" && pagoA="Dalton" ORDER BY id ASC'; $buscar = $conexao->prepare($sql2); $buscar->execute(); $ret...
asked by 25.09.2017 / 21:51
2
answers

Search with Inner join [closed]

I'm doing a search where the user enters the order ID and the system does return the request's observation, product code and qtd. And these data are arranged in 2 tables. (I did not create the bank, it already came ready) However, with my query...
asked by 20.10.2017 / 20:26
1
answer

Form does not pass variable - MYSQL for PHP

I have a code called index.php , it should send the data to post.php , to be stored inside a database. I'm doing it through form. When I store the form fields in the database it thinks I am sending the variable name, it follows th...
asked by 14.03.2016 / 22:41
3
answers

Mysql Update of empty columns only [closed]

There is some way to do an Update in mysql where you only let update the data if the column is empty. Imagine 4 input radio (the radios are marking 1 at a time) If a user (x) chooses radio 1 and saves, and user (y) chooses radio 2 and s...
asked by 17.01.2016 / 01:01