Posts by chocolatemontana • 573 points
19 posts
-
3
votes1
answer70
viewsQ: Problems sorting an array
I have an array of objects: $arrayTeste[] = array( "horario" =>$arr[$i]['horario'], "valor" =>$valorSoma, "nome" =>$arr[$i]['nome'] ); The schedule was all cluttered, so I ordered using the…
phpasked chocolatemontana 573 -
2
votes3
answers2111
viewsQ: Convert date format DD/MM/YYYY to YYYY-MM-DD stored in a scan
The field data is the type of varchar, in the month of June the date format is DD/MM/YYYY, but wanted to change it to YYYY-MM-DD since it is the format that Mysql accepts and to follow the current…
mysqlasked chocolatemontana 573 -
0
votes0
answers37
viewsQ: CURRENT_DATE() saving in different format
At the bank, the data is in a varchar, I simply use CURRENT_DATE() to save the date to the bank. But it looks like he’s saving in a different format inside the bank, depending on the month,…
phpasked chocolatemontana 573 -
17
votes4
answers847
viewsQ: How to generate indented code?
How to print indented code when I give one echo by PHP? let’s say the structure is like this: echo '<div>'. '<table>'. '<tr>'. '<td>'. '</td>'. '</tr>'.…
-
3
votes3
answers18470
viewsQ: Is there any way to close a browser tab with javascript?
I have a script that only works locally. Is there any way to close the browser tab using javascript? If so, could they give examples?
-
8
votes3
answers1459
viewsQ: How to get only the second class with Jquery?
<td> <input type="radio" value="5" name="Form1a1" class="abobrinha Form1comentarioA" /> </td> I have 2 classes inside in my radio input, in jQuery I would like to select only the…
-
3
votes2
answers1472
viewsQ: how to know if the date is of the date type yyyy-mm-dd, dd/mm/yyyy etc?
the question gets even harder: the field data_cadastro is as sweep, I have several tables and each one of them has a different type of date, for example: in a table there: 2015-12-01; in the other:…
phpasked chocolatemontana 573 -
1
votes1
answer42
viewsQ: Help with object array
Is there a way to add, not manually, an indexed array? For example: $arrayNomeBDs[0] = array ( "nome_tabela" => "TabelaDeNome1", "db-tb-name" => "table_name_bd1" ); $arrayNomeBDs[1] = array (…
phpasked chocolatemontana 573 -
1
votes1
answer33
viewsQ: how to generate a table with an array size 228
echo "<script>console.log(\"".sizeOf($status)."\");</script>"; That one array has a size of 228. Within that array there is nome, status1, status2, status3, status4. (5 columns). I…
phpasked chocolatemontana 573 -
5
votes2
answers2303
viewsQ: How to modify the HTML document via an extension?
I would like to make a button appear on the site I developed, but only for those who have the extension. I have the CSS, HTML and Javascript codes to generate the button. The functionality of the…
-
1
votes1
answer76
viewsQ: select with images (generate div’s by id dynamically)
http://ibrc.com.br/teste/icon-select-example4.html I am using a plugin that simulates a select, but with images. the intention is to take the values of each image and play within a text input from…
javascriptasked chocolatemontana 573 -
3
votes2
answers50
viewsQ: generate query dynamically with Union
$sql = 'SELECT COUNT(*) FROM '; $cola = ' UNION '; // Deixar os espaços em branco "em volta". $colaWhere = ' WHERE '; $first = true; $wheres = ""; foreach($arrayNomeBDs as $nomeBD){ $where = '…
-
0
votes1
answer65
viewsQ: show table data between two chosen dates (dates are in varchar)
SELECT * FROM minhaTabela WHERE status=2 AND nomePessoa='Jose Silva' AND STR_TO_DATE(data_enviado, '%d/%m/%Y') BETWEEN STR_TO_DATE('01/05/2015', '%d/%m/%Y') AND STR_TO_DATE('31/06/2015', '%d/%m/%Y')…
-
0
votes3
answers472
viewsQ: Ignore certain values in Mysql
$query = "SELECT COUNT(status) FROM $nomeTabela WHERE status=$numeroStatus AND nomePessoa='$nomePessoa'"; Can you optimize this? There is status of 0 to 10 (in this query I need to query only in the…
-
2
votes1
answer72
viewsQ: Error: mysql_fetch_assoc inside Function
function retornaStatusPesquisa($numeroStatus,$nomePessoa, $nomeTabela){ $query = mysql_query("SELECT COUNT(status) AS valorStatus FROM $nomeTabela WHERE status=$numeroStatus AND…
-
0
votes2
answers2437
viewsQ: remove the repeated values
If it type 1, I have to check that in the table there is no value 1 that has already been typed, if there is the repeated value, remove the value 1 and keep the other intact. So for other values.…
-
2
votes0
answers32
viewsQ: doubt about functions in javascript
when should I use Function nomeDaFunction(){} and var algumaFunction = function(){} ? is there a correct way or way of good practice? in my programs, I have always used nomeDaFunction(){} , but I…
javascriptasked chocolatemontana 573 -
1
votes2
answers568
viewsQ: How to remove and add a particular TD
Inside eachtr there are several buttons (add and remove) and their respective td(s), how to know which given tr should I delete if I click one of the add or rem Buttons? I also wanted to add a new…
-
3
votes2
answers1032
viewsQ: print special characters when generating file
Some strings are coming out like this when generating my . txt É fácil entrar em contato com a área I read another file. txt that has several sentences, I make a treatment of all the lines and…
javaasked chocolatemontana 573