Posts by Smoke Rohden • 793 points
51 posts
-
1
votes1
answer36
viewsQ: How to dynamically assign line break delimiter
My question would be if there is any function that I can use in my example code below so that php itself is in charge of identifying that every two sets of values there is a line break without I…
phpasked Smoke Rohden 793 -
1
votes1
answer240
viewsQ: Javascript does not work after update div
I have a button Atualiza Conteudo that if someone clicks does a refresh only in the div content and does not update the entire page. So far so good, it turns out that the nova_pagina.php that I am…
-
0
votes1
answer97
viewsQ: Include registration and return disabled button without refresh
I made a button adicionar amigo, as in social networks, except that I use form to do this, it sends the user to another page. Wanted some dynamic way without updating the page, when clicking the…
-
-3
votes4
answers836
viewsQ: Quote at the beginning and end of each number
I need to quote at the beginning and end of each number. Example: I have the following sequence: $seq = "123,456,789"; the result would have to stay like this $seq = "'123','456','789'";…
phpasked Smoke Rohden 793 -
-1
votes2
answers1029
viewsQ: Consult two tables without foreign key and relationship
I have two tables tb_pedido and tb_pagamento, put an example below with some dummy data. I need a report that shows the data of tb_pedido and of tb_pagamento, all in a single table as in example 3.…
-
-3
votes2
answers57
viewsQ: Convert string "11092018" to date format "11-09-2018"?
How do I transform, for example, a string "11092018" in "11-09-2018"? Is there a function I can use?
phpasked Smoke Rohden 793 -
1
votes2
answers754
viewsQ: How to insert multiple records with 1 Insert?
I need to enter multiple records with an Insert Example: $ids= "1,2,3,4" $conn->prepare("INSERT INTO documento (id) VALUES (1)"); $conn->prepare("INSERT INTO documento (id) VALUES (2)");…
-
0
votes1
answer1180
viewsQ: Sort Datetime from a Datatable
I am having problems ordering Datetime field from a Datatable, I am returning records from my table users via server-side. The problem is time to click on the label of a column of the type Datetime,…
-
1
votes1
answer121
viewsQ: Filtering data in mysql
I have a table called tb_codes containing the following columns: Cod,txt1,txt2 I need to add the number of characters in the two columns txt1 and txt2, in the example below the character size is 6,…
-
0
votes1
answer38
viewsQ: Filter data in sql
I have a table clientes with the columns: nome cidade email1 email2 Not all customers have registered email. How do I set up an instruction sql where only returns customers that contain email1 or…
-
3
votes2
answers77
viewsQ: Updating multiple records at the same time
I have a list with the id and email of each user id email 1 [email protected] 2 [email protected] 3 joao@gmailcom ... How do I mount an sql statement to update all emails at once in my user table? My…
-
0
votes1
answer125
viewsQ: Import data in mysql from a layout
I am importing some data in the table "tb_usuario" that comes from a text file, it works as a layout for the import of these records, I used semicolon to delimit the position of these data in the…
-
0
votes2
answers231
viewsQ: Inserting date in American standard
I have a function to import data from a txt document, the layout that I use to import this data is delimited by semicolon, I have the following columns (number, data_inclusion, sender, currency,…
-
0
votes1
answer769
viewsQ: Register multiple records using the same form
I have a customer registration form where it is possible to register one customer at a time, how do I register two clients at once using this same form? Tested put one more input, but only register…
-
3
votes2
answers1940
viewsQ: Add a number in front of all records
A question arose when mounting an sql statement. I have several records in a table called db_contrato, I wanted to add the number 0 in front of all records, for now I defined the contract column as…
-
0
votes2
answers75
viewsA: Form data is not registered in the database
I made some modifications to the file in your php code, try something like this I hope I helped. contact.html <form action="contatoTeste.php" method="POST" role="form" name="contatoForm"…
-
2
votes1
answer580
viewsQ: Deleting records marked with checkbox
I wish I could delete multiple records from a table just by selecting the records using the checkbox, Like Gmail, I select the emails I want to delete or mark as read. Because when I need to delete…
-
4
votes2
answers277
viewsQ: Why does type='date' not work in Firefox?
I was testing a script to calculate interest and realized that my code does not work on Google Chrome, but if I open the same script on Mozilla it works perfectly. I wonder what it might be?…
-
0
votes1
answer79
viewsQ: Show message according to URL
How do I show a message according to the URL the user is accessing? For example: Message: You are on page A , when the url matches http://localhost/blog/home/a. php You are on page B , when the url…
phpasked Smoke Rohden 793 -
4
votes2
answers2715
viewsQ: Calculating interest with javascript
I’m having trouble putting together a script, I’m not knowing how to calculate date interaction with javascript, I was thinking of making a screen that calculates interest, but returns the values in…
-
1
votes2
answers679
viewsQ: Formatting result to currency
How do I format the value of two input in the currency format by rounding the values. For example, if the commission is 1200 the return on input ir and valor líquido give 18% and 1.182, but when it…
-
3
votes1
answer178
viewsQ: Showing data when typing
I need to show two pieces of information when the user enters the commission amount, in case the information that should show IR and Valor líquido. For example, if the user types 1.200,00, on the…
-
0
votes1
answer3711
viewsQ: Find difference between two tables
I wanted to mount an sql statement that returns differences between two tables. For example, I have the table arquivos and the table conferencias where it has equal fields called titulo and valor,…
-
0
votes2
answers427
viewsQ: Difficulty creating summation column in mysql
I am making a committee report, but a doubt has arisen, I want to bring some totals at the end of the report such as the gross value of all committees, which would be the vl_comis - desc_comis.…
-
2
votes1
answer52
viewsQ: Difficulty mounting an SQL statement
I’ve been cracking my head here to mount an SQL, maybe someone can help me. I’m trying to draft a report to charge the relationship notes that were eventually deleted. The user registers an nf in…
-
1
votes7
answers412
viewsQ: Mount an sql query filtering data
I am trying to assemble a report, where I need to list deleted documents, I have the following sql statement: SELECT id,nf,status,data FROM documentos For example I have the following results: When…
sqlasked Smoke Rohden 793 -
0
votes1
answer243
viewsQ: Renaming values in mysql
I have the following sql query: select nf,status from notas where status = 3 Instead of bringing the number 3 in the result of the sql query, I wanted to show another message: "completed". how do I…
-
2
votes3
answers1667
viewsQ: Show input when user selects option
How do I show the name label and the name input only when the user selects the inactive option? <div> <label>Status</label> <select name="status"> <option…
-
1
votes1
answer3654
viewsA: Find duplicate values in an Oracle table
I didn’t quite understand which of these two you’d need, so I included both: A query to find duplicates: Select localid, applicationname, count(*) from mensagem group by localid, applicationname…
-
3
votes2
answers69
viewsA: How to create a page that displays database entries?
A simple way to display the database’s registered data using php would be like this: <?php // definições de host, database, usuário e senha $host = "nome_do_host"; $db = "nome_do_banco"; $user =…
-
0
votes1
answer137
viewsQ: Filter data by period
I’m having trouble putting together a sql to my system. I have a table anuencias with a column status. I want to list data where on status contain words "signature", "ready to send" and "cartorio"…
sqlasked Smoke Rohden 793 -
0
votes1
answer263
viewsA: 3 bootstrap speakers
Try changing your code to <div class="col-xs-12 col-sm-4 col-md-4 cloneditem-1"> <button data-rel="uploads/pro-GLD6014.jpg"><img src="uploads/gld6014.jpg"…
bootstrap-3answered Smoke Rohden 793 -
0
votes0
answers28
viewsQ: How to view Cookie on another page
I have the code below: php cookie. $d1 = "27/07/2017"; $d2 = "27/07/2017"; setcookie("d1",$d1, (time() + (3 * 24 * 3600))); setcookie("d2",$d2, (time() + (3 * 24 * 3600))); $data1 = $_COOKIE["d1"];…
phpasked Smoke Rohden 793 -
0
votes1
answer76
viewsQ: Pass id to call modal
I have an array of a table called devolucoes that I use to mount a datatable, and I wanted to call a modal in the description column, but so far so good, only it loads the empty modal because I’m…
phpasked Smoke Rohden 793 -
2
votes1
answer84
viewsQ: Rename values using if Else
I am using Datatable to generate a table where there is a Status field that receives values 1 or 2 and Status with value 1 is Active and 2 is Inactive. how do I show Active/Inactive instead of the…
phpasked Smoke Rohden 793 -
0
votes1
answer503
viewsQ: Perform condition on Trigger
I have a Rigger that updates my table. I wanted to know how to make Trigger only run if the status column is different from the one already in my table, if it is the same nothing happens. DELIMITER…
-
0
votes2
answers33
viewsQ: Concatenate data from a table
I have the following sql statement: SELECT a.alunonome AS aluno, m.materianome AS disciplina, AVG(CASE n.notabimestre WHEN 1 THEN n.nota ELSE null END) AS bim1, AVG(CASE n.notabimestre WHEN 2 THEN…
-
1
votes2
answers178
viewsQ: Group data from a table
I have the following sql statement: Select Notas.NotaID, Materias.MateriaNome, Alunos.AlunoNome, Alunos.AlunoID, max(case when NotaBimestre = 1 then Nota else null end) as 1bim, max(case when…
-
1
votes1
answer307
viewsQ: Build school report
I am trying to mount an SQL to display the results of a School Report Card. In the table of notes I have the data as follows Table Notes MATERIA | NOTA | BIMESTRE PORTUGUES | 10 | 1 PORTUGUES | 8 |…
-
0
votes1
answer35
viewsQ: I can’t save form data
personal I am unable to save my form data in the bank. I have the following files: functions.php /** * Cadastro de Notas */ function add() { if (!empty($_POST['nota'])) { $today = date_create('now',…
phpasked Smoke Rohden 793 -
2
votes1
answer39
viewsQ: Delete first number if 0
How do I delete the first number if it equals "0", for example, I have the following number "0123" would be "123", if it were "123" nothing would happen.
phpasked Smoke Rohden 793 -
0
votes1
answer155
viewsQ: Where part of Yii2 I connect to the database
In the Yii2 Framework application I’m using the "Advanced" template, I’m having difficulty making the connection. Where the framework is connected to the mysql database?
-
1
votes1
answer330
viewsA: Required html is not working
Place inside a form. <form> <label for="descricao" class="col-sm-1 control-label">Descrição:</label> <div class="col-sm-9"> <input type="text" name="desc"…
-
3
votes2
answers1061
viewsQ: Calculate the maturity date of the experience contract
I need to create a screen that automatically calculates the expiration dates of the experience contract. The user enters the initial date and already shows me the date that wins the contract in case…
phpasked Smoke Rohden 793 -
1
votes2
answers1277
viewsQ: Calculation of hours with php
How to calculate the time the person entered and the time the person left minus the interval and display the total of hours they gave? For example if a guy made the following schedule: 07:30 12:00…
-
5
votes1
answer638
viewsQ: filter records by month
I have the following appointment: $sql= mysql_query("SELECT dia, GROUP_CONCAT(hora) FROM marcacoes WHERE colaborador_id = {$colaborador_id} GROUP BY dia "); Returns the following table: but I want…
-
3
votes1
answer359
viewsQ: Query sql separated by space
I have the following sql query: $sql= mysql_query("SELECT dia, GROUP_CONCAT(hora) FROM marcacoes WHERE colaborador_id = {$colaborador_id} GROUP BY dia "); The result is:…
mysqlasked Smoke Rohden 793 -
0
votes1
answer263
viewsQ: Group data related to a column
I’m having trouble grouping times by date. I have an html table that is populated from an sql query. The idea would be to list in one column the date and in the other column all times referring to…
-
0
votes1
answer86
viewsQ: Problems in generating a table
I’m having a hard time making a table. Could someone make a table that shows the times an employee made during the month? the idea would be to show the employee beats during the month. In my bank…
-
2
votes1
answer904
viewsQ: Bring Selected based on database values
I have an employee registration screen, when I edit a person I can not bring set the option that is registered there in the bank. Obs. options come from the database and not from the html form. for…