Questions tagged as 'mysql'

2
answers

How do I search for records saved in the current week?

I'm doing a query on a database, and I want to list the records for the current week. It would be something based on the question about fetching data from the last 7 days from the current date , but instead from the current date, would be the s...
asked by 25.01.2017 / 17:51
2
answers

Set OPTION as SELECTED based on database values

I am preparing a form where I am setting the values of the fields with the data of the database. I'm having trouble setting the option chosen as selected to <select/> in the code below: PHP <!-- ATENCAO --> &l...
asked by 17.06.2014 / 18:17
3
answers

How to rename the SQL Table column

I want to rename the column via SQL. I'm trying this way: ALTER TABLE nomes_clientes RENAME COLUMN primeiro_nome TO nome, RENAME COLUMN segundo_nome TO sobrenome; But that way it is not working.     
asked by 08.09.2017 / 18:56
2
answers

Smart query with MySQL

I'm trying to make a more "smart" query in my DB, My question is how? I have a query : SELECT * from publicacao where titulo like '%$busca%'; and in my DB there are several publishing titles, for example: Farmácia Pharmácia Pharmacia...
asked by 22.11.2016 / 19:22
2
answers

What is the purpose of the = operator in MySQL?

SELECT * FROM 'client' WHERE avatar <=> NULL This returned the only two items you have in the database, both for <=> and = . Another test I did was with <=> , which returns all items that the =...
asked by 09.06.2017 / 21:46
2
answers

how to do a dynamic Stored Procedure picking up data from other database tables?

I'm in a social networking project with @RodrigoBorth , and we have the problem of How to index and update a user comparison system ... We were given the idea of working with Stored Procedure in MySQL and then I went back! I read about concep...
asked by 07.03.2014 / 13:57
2
answers

What data types exist in MySQL for texts?

What data types exist in MySQL? What is best for storing long texts? (for example in the form of HTML) Why?     
asked by 08.08.2015 / 03:57
2
answers

MySQL Surnames in Inner Join

I tried to do this internal join in SQL to link two tables in my report. What I would be doing wrong, why is giving "Unknown ffccf column", even though I am naming the column? Follow the code: SELECT finafim.ccf as ffccf, finafim.impcaix...
asked by 29.05.2014 / 15:03
2
answers

Connection with the Bank falls after a certain time

I have a server where I have several web applications connected to the database ( Mysql ). The problem is that if some system is idle it loses the connection with the bank and I have to give a refresh in the application so that everything...
asked by 18.12.2015 / 14:30
5
answers

Save in the database the binary content of an image

How do I get the bytecode of an image at upload time to be able to store it in the mysql blob field without the need to save the image to ftp?     
asked by 04.12.2014 / 15:50