Questions tagged as 'mysql'

1
answer

Number of records that do not satisfy a given filter

I have this query: SELECT * FROM Tabela WHERE campo != ""; How do you know the number of records that do not meet this condition? I know I can create another query and use affected rows to get the 2 values and compare but I wanted to k...
asked by 20.10.2015 / 13:58
1
answer

How to do SELECT to get data in different tables and with different id's

It has 3 tables In the entrada table you have the data: id_entrada , id_empresa , id_categoria and id_subcategory. In the cat_entradas table I have: id_categoria and categoria . And in the...
asked by 29.10.2015 / 21:17
2
answers

Is it possible to use between to filter searches with a character type field?

For example, if I am to search the database for a table with the price of the products, I use it in my condition where: preco_produto between 10 and 550 but and for me to do the same type of search in a column of character type? Because when try...
asked by 15.10.2015 / 21:39
1
answer

Unlink is not working inside loop [closed]

I'm trying for some time to delete images from a folder through an unlink inside a loop , in the case while , however I'm encountering the error:    PHP Warning: unlink (admin / imgsupload / 32acafa5b1bac0d2af522f76627e3212.jpg) [...
asked by 18.10.2015 / 02:04
2
answers

Error in a SQL syntax - mysqli_real_escape_string

I have a syntax error in my code, but I can not find which one is wrong. This is the error I'm getting:    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '...
asked by 17.10.2015 / 05:25
1
answer

Sort by value of ENUM MySql

I have a question and since I did not find anything on the internet I decided to ask you, well, I have a MySql table and this table contains an ENUM field that can be 'yes' or 'no', I wonder if it is possible to sort the results for those values...
asked by 25.02.2016 / 19:38
1
answer

Find content according to two Combobox

On the home page of my site I need to have two combobox for the user to select options coming from the database (for example: select the state in the first combobox and when selecting the state in the second combobox are loaded the cities of thi...
asked by 20.01.2016 / 17:01
1
answer

Two-language site [duplicate]

I will have to develop a site in two languages, Portuguese and English. Nothing complex, but I am in doubt as to how to organize the structure, so I would like the opinion of someone who has already been in my current situation. The site sh...
asked by 28.01.2016 / 18:20
3
answers

Apache2 error in linux

I installed everything right on Linux, I threw my folder in the www directory when I opened the broswer and received the following warning:    Access denied for user 'root @ localhost' (using password: NO) How do I solve it?     
asked by 21.01.2016 / 13:58
1
answer

Get records created in a MySQL date range

Dear friends, I have a mysql table that receives the effective data from the workforce on a client of my company. Each record of the DB has a start date (When this service started to be rendered on that client) and an end date (When this s...
asked by 04.02.2016 / 12:57