Questions tagged as 'mysql'

2
answers

Repeat condition in WHERE at query time

I currently use WHERE coluna IN (1,2,3,4) in my query. Only I noticed that IN works as a sort of "OR", this gives me a small problem because ID are characteristics of a product. These features are selected from a menu, and I...
asked by 10.02.2017 / 23:03
1
answer

PHP break list items "li" into variables to add to table MYSQL

I have a form with <textarea> with the following value: <textarea id="lista-ingredientes" name="lista-ingredientes"> <ul> <li>sal</li> <li>pimenta</li> </ul> <textarea> I ne...
asked by 11.10.2017 / 14:49
2
answers

How to transform the data from a sql table into a link?

I'm learning PHP and so I do not know the technical terms, so this is not only a question, but also a puzzle !!! I created the databases and the tables everything works normal, but now I've stuck. Now I want to get this row and make a link,...
asked by 22.08.2017 / 02:35
3
answers

generate randomly for a period of time in php

I have this code: <?php $array_number = array(); for($i = 1; $i <=11; $i++) { $value = rand(1,11); while (in_array($value, $array_number)) { $value = rand(1,11); } $array_number[$i - 1] = $value; } $serve...
asked by 19.01.2018 / 19:25
1
answer

I can not type the password when I am installing MySQL

Hello, when I install MySQL from Ubuntu, I can not type the password, as you can see in the image below:     
asked by 09.11.2016 / 16:29
1
answer

Select only items that contain the number in their value

I have a conversas table: STRUCTURE +--------+---------+ | Nome | Tipo | +--------+---------+ | id | int | | users | text | | titulo | varchar | +--------+---------+ I need to select the items that contain the u...
asked by 04.02.2016 / 15:25
1
answer

MySql - Insert multiple products into one order

I have a request table in mysql, where it must be informed the total value of the request, the date, the customer id, and the products that were purchased. The problem that these products is in the product table. I would like to know how do I in...
asked by 20.02.2016 / 17:43
1
answer

Get a value from another field other than id

I have the following tables: 1 - AssignmentsLogs with the following fields: Id, OrderNode, Contributor and DataAtribution. 2 - StateLoves with the following fields: id, StatusId, and Status. The OrderID is equal to the IdEst. Now I w...
asked by 05.01.2018 / 18:45
1
answer

PHP mySQL problem when using umlaut

I need to develop a script that checks for an accented character in the string and saves a string variable without the umlaut. The script that clears below compiles //Checa Especial $nomeCliente = "Bröring"; if(strstr($nomeCliente, "ä") ||...
asked by 21.12.2017 / 15:55
4
answers

Error using variables in a query

Good morning, I'm new to PHP and I'm trying to make a form that puts the data in a mysql bd. HTML code (Bootstrap): <div class="form-group"> <label for="nome" class="col-md-1 control-label">Nome:</label> <div class=...
asked by 16.06.2015 / 14:23