Posts by IronManBR • 46 points
9 posts
-
1
votes3
answers1626
viewsA: It is possible to collect data of the whole month in postgresql
Only continuing the options already mentioned Option with date_trunc SELECT * FROM dados WHERE date_trunc('month', data_registro) = date_trunc('month', '2015-03-01'); In this case the parameter can…
-
1
votes3
answers707
views -
0
votes2
answers37
viewsA: Count Out of a Ranking
Option 1: I will disregard that you make use of the result of your query after the loop so change it to: $query = "SELECT DISTINCT filmes FROM filmes_rec GROUP by filmes ORDER by count(filmes) DESC…
-
0
votes2
answers150
viewsA: Is this kind of normalization feasible?
Good as I can not comment, I would do everything on the same table and still make a Unique to ensure uniqueness, better maintenance, an example of my: customer{ id integer document varchar,…
-
0
votes2
answers818
viewsA: Block click the menu item after the first click
I don’t know if it solves your problem, but if tag creating a href and redirecting to a new page, but since it takes time to remove the action, could remove the "href" of tag after the click. try…
-
0
votes3
answers729
viewsA: Receive two positive numbers and repeat the interval between them with while?
Good considering that num2 is larger than num1 the code to be able to count between them may be the following: var num1 = 3; var num2 = 14; var numero = num1; if ((num1 >=0 && num2…
-
1
votes1
answer39
viewsA: Implement bookmark option on a server
There is no way to generate a relationship between two entities without generating a new record, in the case as it is N p/N, there will always be a data to be replicated, then your decision should…
business-ruleanswered IronManBR 46 -
-1
votes3
answers994
viewsA: Query with connection to more than one mysql php database
There is not much to complement, but the fact of not seeking in the right place is why it is not indicating the place to be sought, Example: $sql = '...'; // Para buscar no banco bigchamados…
-
0
votes2
answers2237
viewsA: PHP insert a data array into a mysql table
Well this is not by far the best solution, I’m only giving you a north, but the ideal would be to have value escapes to avoid SQL Injection, so this is only a reduced form. ah! I have not tested.…