Questions tagged as 'mysql'

2
answers

Problem with inner join in MySQL

I'm trying to create a query to bring results that are in different tables in MySQL , but I'm not getting it. I have experience in JOIN in SQL , but I'm getting a little to do in MySQL , can you help me? I already consulted here on the...
asked by 21.03.2018 / 03:39
1
answer

make a group of IDs equal

Well, I have a table that returns 5 users, and among those 5 there can be equal teamIDs, for example: usuario1 = teamid: 51 usuario2 = teamid: 51 usuario3 = teamid: 55 usuario4 = teamid: 55 usuario5 = teamid: null I would like to know how I...
asked by 08.02.2018 / 05:54
0
answers

connection close - before or after?

What's best, close before or after while? For example, Mode1 : $sql= "SELECT * FROM tabela"; $rs = mysql_query($sql,$connect); mysql_close($connect); while($row = mysql_fetch_array($rs)){ $nome = $row['nome']; echo $nome; } or Mo...
asked by 09.02.2018 / 13:09
2
answers

Radio buttom that when selected changes the background of a div and saves in DB the result

Hi, what I want to do specifically are radio buttons that when one activates the background color of the div skips the default color (white) and changes its background color according to the buttom radius, and save that change in the database. da...
asked by 01.02.2018 / 02:54
0
answers

The data is not registered in the database, but it appears that the registration was successful [closed]

<?php$host="localhost"; $user = "root"; $pass = ""; $db = "tomorrow"; $conexao=@mysqli_connect($host, $user, $pass) or die(mysqli_error()); mysqli_select_db($conexao,$db) or die(mysqli_error()); ?> <?php $username=$_POST['username'];...
asked by 02.02.2018 / 01:59
1
answer

Mysql query based on checkbox result

I'm having trouble creating a mysql query based on checkbox. 1. I have a form based on a select that contains a checkbox for     line <input type="checkbox" name="check[]" value="<?php echo $linhas['id'];?>" > 2. I make a...
asked by 28.02.2018 / 16:50
1
answer

How to pass javascript return to php variable

I'm passing data from some inputs to a modal, I'm doing this with jquery, up to blza, more precise the data that was sent and uses them in a mysqli query, my doubt as I pass the values sent by jquery for php variables and so use them in my query...
asked by 16.01.2018 / 20:25
1
answer

Update the rest of a table from the data contained in a row

The following figure explains well what I want to try (and what I tried to do but it did not work): That is, I need to update some rows of a table with the same data contained in a row (specifically the columns bankId, proj_day and liq_...
asked by 16.01.2018 / 01:36
1
answer

MySQL - Create field to insert more than one value coming from another table

Next, it may seem like a basic question but I need to know, I'm going straight to the point: I have a Players registry and a game registry (tables), referenced normally. I need to know how do I enable a player to select more than one game of...
asked by 23.01.2018 / 00:52
2
answers

result in 2 table columns

Good afternoon friends, I'm having a difficult time putting together a table with a result of 2 columns with database information. <table style='width: 100%;' border='1' cellspacing='0' cellpadding='0'> <thead> <tr style='b...
asked by 30.01.2018 / 20:34