Posts by Wesley Ferreira • 88 points
7 posts
-
0
votes3
answers1636
viewsA: How to create a conditional index in Mysql?
I think you will get a better performance by adding a partition to the table. CREATE TABLE sua_tabela (campos ..) PARTITION BY LIST(status) ( PARTITION p_ativos VALUES IN ('ATIVO'), PARTITION…
-
0
votes1
answer375
viewsA: Subquery Returns more than 1 Row Mysql
Instead of this understatement try this: select a.id from message a inner join tempMsg b on a.user_from = b.user and a.user_to = b.user
-
2
votes3
answers246
viewsA: Numeros javascript comparison
You don’t need to compare AND. In this case you can use Echo. would stay if(tempo_considerado <= 0){ valor_total = 0.00;} else if(tempo_considerado<= 10){ valor_total = 0.00;} else…
javascriptanswered Wesley Ferreira 88 -
0
votes3
answers8998
viewsA: How to call, in Python, a function whose name is stored in a variable?
You can create a control function to call the other functions. Example: def execute(nomedafuncao): If (nomedafuncao = 'nomedafuncao'): funcao Or: exec(nomedafuncao)…
-
0
votes1
answer32
viewsA: How to select between one hour and another in SQL
Try to convert to text: SELECT SUM(quantidade) FROM notafiscal WHERE DATE_FORMAT(Data_compra, '%T') BETWEEN '13:00:00' AND '17:30:00'
-
2
votes1
answer38
viewsA: How to change a table indicating that data from a certain field can only vary from date 1 to date 2?
To prevent data entries that are not on these dates you can create a contraint in the table, thus: alter table LOC_VEICULO add constraint check_DT_FABRICACAO CHECK (DT_FABRICACAO between…
-
0
votes1
answer100
viewsQ: Parameter in page URL
Dear, I need to create a Pyramid application for use of API. 1 - "/Quotes/< quote_number>" - Present page containing the quote returned by the API corresponding to < quote_number >. I…