Questions tagged as 'mysql'

4
answers

select dynamic

Good afternoon! I have a table something like this: id | valor | nome_campo | item_id (fk) ---------------------------------------------- 1 | 9 | campo_1 | 22 2 | 10 | campo_2 | 21 3 |...
asked by 28.07.2016 / 20:43
2
answers

Query with calculation returning error in condition

I have the following select: SELECT imp_loja AS LOJA, imp_item AS ITEM, imp_desc AS DESCRICAO, imp_dias_giro AS DIAS_DE_GIRO, imp_nec AS NECESSIDADE, imp_pedido AS PEDIDO, imp_bancao AS BANCAO,...
asked by 22.06.2016 / 20:19
2
answers

Select with INNER JOIN, bringing fields that have foreign key NULL

I have a table of items, request_itens, interested (it has auto relationship, it is used for secretary, sector and employee, and a requested table), in the order table I have 3 foreign keys (one for secretariat, another for sector and one more f...
asked by 27.05.2016 / 23:21
2
answers

Function Percentage in PHP

How to do a percentage function. In that it calculates the td or the equal table of Excel to give the percentage. I want to calculate the percentage of a value in PHP, for example 10% of 100, type Excel DADOSx100=% and calculate...
asked by 29.11.2015 / 02:50
1
answer

Capitalize string with accented characters

I have a problem saving words with accents in MYSQL. My bank is all set to ut8_unicode_ci and my php pages have <meta charset="utf-8"> . This solved my initial problem with accents, but I wanted the data to be saved in t...
asked by 26.10.2015 / 11:35
2
answers

Error Parse error: syntax error, unexpected 'mysql_query' (T_STRING) [closed]

Well I'm trying to do a "PHP and MySQL Registration System" I did this following all the instructions passed to me but at the time of the result it returns the following message.    Parse error: syntax error, unexpected 'mysql_query' (T_STRIN...
asked by 02.06.2015 / 01:36
2
answers

Problem with access limit by refresh account JAVASCRIPT

Is there any way to return updated direct server data in HTML without using setInterval , setTimeout these things? Because these functions are getting rid of the server .. Every time it refresh it is as if it were having one m...
asked by 14.07.2015 / 16:06
2
answers

Convert MySQL data dd / mm / yyyy to yyyy-mm-dd

I have a database where I inserted the dates in the format dd/mm/yyyy (example: 05/11/1987 ), but now I'm organizing reports and I need to update all the dates in the database to the format yyyy-mm-dd 1987-11-05 ). How do I...
asked by 30.06.2015 / 18:39
2
answers

Check UNIQUE element before inserting it

I have a table in a MySQL database where one of your fields (email) is UNIQUE , when inserting a record I must first make a select checking if there is a record whose email field match the email I want to insert (remembering that th...
asked by 13.04.2015 / 19:09
2
answers

Fill Second Input automatically when filling the First

I have a input that I'll give the name of input-1 , and there I'll insert this: 12:00 When I have a second input that I am going to give the name of input-2 , it is possible to insert in input-1 : 12:...
asked by 23.04.2015 / 01:10