Questions tagged as 'mysql'

1
answer

How to modify the text coming from the database?

Then, when I do the request of the text in the database through this statement in php <?=converte($linha['DESCRICAO_PARA_WEB'], 0)?> the text is presented all in block without the line breaks. This function converts is the change...
asked by 03.10.2014 / 16:43
3
answers

Make MySQL Select Values Comparison

I have a table with four columns, the first with a type, the second with the minimum value, the third with the max value, and the fourth with the data that I want. I need to select the value of the fourth column when the type is in the table and...
asked by 26.09.2014 / 19:22
1
answer

Wrong parameter type error in mysql_fetch_assoc ()

   Warning: mysql_fetch_assoc () expects parameter 1 to be resource, boolean given in C: \ xampp \ htdocs \ NEW \ admin \ alterfotos.php on line 16 $id_imagem = trim($_GET['id_imagem']); $dados = mysql_fetch_assoc( mysql_query("SELEC...
asked by 18.09.2014 / 01:56
1
answer

MySQL beginner with great difficulty [closed]

Well, I wanted to start learning MySQL , but I'm not getting started, I do not understand the software or anything, web tutorials do not talk about MySQL on Mac , only on Windows . I downloaded MySQL on Oracle's w...
asked by 06.11.2015 / 08:23
1
answer

Set mysql variable with the name {parametro1}

The way to set a variable in mysql is like this: SET @variavel = valor In Documentation says that the variable name can contain other characters, and in the case it should be set SET @'variavel' = valor . Is it possible to create...
asked by 31.10.2015 / 17:22
2
answers

Get random value mysql

I would like to know some way to get some random value from MySQL without repeating, I am using this line: $query = mysql_query("SELECT * FROM users ORDER BY RAND()");     
asked by 28.10.2015 / 21:10
1
answer

Errors when inserting images in mysql

Hello, I would like to insert images into the database for a personal project. The image is sent to the bank yes, but not without showing 3 errors, it follows the code and the errors: <?php $servidor = 'localhost'; $banco = 'banco_tcc';...
asked by 04.11.2015 / 11:29
2
answers

Merge two tables into a third table

I need to merge two tables imagem1 and imagem2 into a third table imagens with SQL . They have exactly the same structure but with 1 query I can not write all the data at once, so I need to do 2 queries. I need a SQL...
asked by 18.01.2015 / 14:10
1
answer

Problem saving result of a SQL query to a PHP variable

I have SELECT to return the value of a field of table funcionarionew , my idea is to save the result of SELECT on a variable and then insert the value of that variable into another table ( terminal_cartao ). In my co...
asked by 26.01.2015 / 18:37
1
answer

Search database with encrypted data

I have a database where the inserted data is encrypted through a function written in PHP, this function encrypts and decrypts. I need to search this table. For example, I search for "BRAZIL", but in the table "BRAZIL" is encrypted as: cd...
asked by 28.01.2015 / 16:40