Questions tagged as 'mysql'

2
answers

How to solve a search problem with accented words

I made a data entry into a table in my database using the command load and the fields with accent were correct, such as Sofá Nápoli , but when changing any record that contains accent through my control panel the record sent to the...
asked by 07.04.2015 / 18:02
1
answer

Handling of values returned in the query

I need to "handle" the return of a SELECT as follows: - value recorded in the bank: www.dominio.com.br or www.dominio.com - value treated on page: dominio ; That is, I need to have query "remove" before and after th...
asked by 07.04.2015 / 19:55
2
answers

Problem in connection with database

I am changing a code from a news system that came with charset iso ... I now want to change it to utf8. Now the problem is when I click on read more. Ihavealreadyalteredthetablesforutf8andIworkwiththepagesinutf8,Ithinktheproblemisintheconne...
asked by 08.12.2014 / 22:10
1
answer

Error Code: 1406. Data too long for column 'txtContabilidade' at row 1

In MySQL .. I want to do UPDATE in a text field, it has about 300 characters and does not allow doing it, informed that it is too long. I have already tried changing the field type up to "Longtext", "VARCHAR (1000)" and did not allow it. Is t...
asked by 06.08.2014 / 20:24
1
answer

mysql error when importing tables

When I do an import of 44 tables mysql returns me the following error:    # 1062 - Duplicate entry '0000000001' for key 'PRIMARY' Does anyone know what it can be? and how to solve?     
asked by 15.08.2014 / 21:05
1
answer

Add lines with the same year

Problem: - Take the lines that have equal years through the command in mysql. Query that I'm using: SELECT produtividade, ano FROM area_e_producao_05_15 INNER JOIN dados_cidades ON edr_id={$edr['edr_id']} WHERE area_e_producao_05_15.id_muni...
asked by 24.02.2015 / 19:39
1
answer

Query that selects the last line of each device?

I have 3 tables in my DB: CREATE TABLE IF NOT EXISTS 'local' ( 'codigo' int(11) NOT NULL AUTO_INCREMENT, 'IMEI' varchar(15) NOT NULL, 'latitude' decimal(10,6) NOT NULL, 'longitude' decimal(10,6) NOT NULL, 'datetime' datetime NOT NULL...
asked by 18.07.2014 / 21:06
1
answer

How to sort by date when day, month and year are each in a column?

Hello, I have the following situation, I have to sort a table by date, but for some particular reason the programmer decided to save the day, month and year in separate columns, since the database is in MySql, there is an effective procedure...
asked by 15.07.2014 / 03:07
1
answer

UPDATE only of fields that are longer than 0 characters

Hi, I have a table with several inputs and I need to make UPDATE of fields with more than 0 characters, those with 0 or blank are the way it is! Is there any way to do this? follow my code: $query = mysql_query("UPDATE 'is' SET 'janmembros'...
asked by 02.07.2014 / 18:31
1
answer

Use different domains within a main site (city guide)

I wanted a light for the following situation: I have a main website (online guide) www.siteprincipal.com.br. In this site I have a table of cities where I register each one and I show the content in the following way: ID: 1 | Location: Uni...
asked by 28.06.2014 / 03:16