Posts by Rhubenni Telesco • 407 points
9 posts
-
0
votes2
answers72
viewsA: Ranking PHP and SQL, without repeating database record
It would be simpler to bring the desired values to the database, avoiding having to make unnecessary loops in your PHP code, so you save time loading the page and make your code easier to maintain.…
-
1
votes1
answer73
viewsA: Mysql GROUP BY - PHP error
I switched the COUNT(*) for SUM(CASE WHEN ctg.assunto = 'xxxxx' THEN 1 END) and replaced the group with group by DataMes, so I have the counts of ctg.assunto in vertical columns, not in grouped…
-
6
votes4
answers1047
viewsA: How to invert words and count total characters
I suggest something like this: $input = $_GET['nome_do_campo']; $invertido = strrev($input); $tamanho = strlen($input); echo "String invertida: <em>{$invertido}</em>. O tamanho é de…
phpanswered Rhubenni Telesco 407 -
1
votes1
answer73
viewsQ: Mysql GROUP BY - PHP error
I have a query in Mysql that, in the command line and in Mysql Workbench, is bringing the correct values, but when running it in PHP, the function GROUP BY is grouping more than it should! Here is…
-
4
votes4
answers82
viewsQ: Doubt with height in a DIV
I have a problem that seems very simple to me and I’ve done it before, but I just don’t remember how! Assuming a page with 3 Ivs (header, content and footer) how do I make the content div take up…
-
10
votes3
answers23953
viewsA: Which content-type is suitable for files like: . doc, . docx, . xls
List of all correct MIME’s for Office: Reference: Office 2007 File Format MIME Types for HTTP Content Streaming…
mime-typeanswered Rhubenni Telesco 407 -
1
votes2
answers448
viewsA: How to resolve loading part of the page in delay
The Loader solution is good, but I doubt that such a small JS will delay page loading. Ideally, you should first find out what is slowing down page loading, before deciding what to do to fix it.…
-
5
votes4
answers352
viewsA: What is the second parameter of array_keys for?
The second parameter returns the index of the positions where a given value is. For example: $array = array("teste", "algo", "outra coisa", "teste", "teste"); var_dump(array_keys($array, "teste"));…
phpanswered Rhubenni Telesco 407 -
1
votes1
answer129
viewsA: Error when migrating from localhost to online server
This error occurs because you are signing in after you have already sent data to the browser. When setting a Session you are creating a cookie on the client machine with the session id via HTTP…