Posts by Victor • 1,539 points
75 posts
-
0
votes2
answers191
viewsQ: Calculate the total of each row in the table
I’m trying to use Javascript to dynamically calculate my prices multiplied by the quantities and result in the total for each row, however it calculates the overall total and plays in the last field…
-
0
votes1
answer99
viewsQ: Order taking only the last registered product
I am creating a simple system to make order reservations, where I bring the products from the database through a simple while, but if I try to put brackets in my Ames, example name=name[] it brings…
-
0
votes2
answers78
viewsQ: Problem with Login
I’m trying to create a basic login, with verification so that there are no records with even users in the database. But I’m making a mistake on this line $row = $resulta->fetch_assoc(); Fatal…
-
0
votes1
answer271
viewsQ: Group Month according to Between
I created a statement in Mysql to display a graphic report, I wanted the months to be displayed from the month informed by the initial date to the month of the final date. But in my SELECT it groups…
-
1
votes3
answers49
viewsA: Remove character to search in database
Note that I have created comments to help you understand the answer. I created an array to avoid problems in the return, and at the beginning of Function used replace to remove character, you can…
-
0
votes2
answers975
viewsA: Mask for landline field does not work
I realized that you need a pure Javascript mask, according to your code, so since the problem is in the phone mask, check the possibility of creating a phone-only mask with regular expressions.…
javascriptanswered Victor 1,539 -
6
votes3
answers156
viewsA: Condition in a select
To use conditions in Mysql you need to understand the clauses it has, then in this case you can use the WHERE (which means "Where", if translated), ie you will indicate to fetch the records WHERE…
-
1
votes3
answers3838
viewsA: Validate an HTML form with JAVASCRIPT
As you requested in Javascript and with alert then there you go. First you’ll need to give a name for your input and your form, and can do it this way as I will show below. function validar() { var…
-
3
votes1
answer353
viewsQ: How to fill in selected input only
I have a problem filling a field within a table that is within a loop For, and one of the titles of this table is a button modal, that as it is clicked opens a selection of units of measure. And to…
-
0
votes2
answers621
viewsA: I am unable to send form data to mysql database
Notice that in its variable $ip is missing a single quote ', and I would make his code so that as someone filled out the form and the data was "new" he would do INSERT otherwise recognise by the…
-
2
votes2
answers435
viewsA: UPDATE PHP com Javascript
I changed your form and your POST and what I’m sending is a functional code, IE, was tested before posting here. Note that I removed the href of your type='submit' because if it is already being…
-
1
votes1
answer180
viewsA: Search by number in Mysql table with PHP
Remembering that below I will use a connection variable, called $Conn, exchange for your variable created to make the connection in the database <?php include_once("../conn/conexao.php");//faz a…
-
2
votes3
answers1885
views -
0
votes2
answers474
viewsA: Print of the result of a ternary operator
You are making the comparison with the very name of the person who typed, should put this way, as I will show below, after all you have to compare to string typed with a value string print('O seu…
-
1
votes2
answers95
viewsA: Difficulty to rescue information from AFFILIATE given a PRODUCT, many relationship to many
Good you will need to utilize the JOIN I imagine it will clear your doubt, and it can also put everything inside the while thus filling the table with the records that will be displayed from the…
-
1
votes2
answers521
viewsQ: Reset html x reset javascript efficiency
I was creating a button to clear form, and I came across the function of HTML type='reset' but I was used to using Javascript for this to occur. Therefore wanted to ask for help to understand what…
-
0
votes1
answer205
views -
3
votes1
answer1853
viewsA: How to send data with JS? without updating page
To send data without your page updating, refresh or something like that. It is necessary to use javascript with a serialize . <script type="text/javascript"…
-
10
votes2
answers2752
viewsA: What is the difference in the statements with [] and {} in Javascript?
Basically you use the {} keys when you want to declare an object. I will give an example creating an object with sub values or better saying, defining values within this object var carro = { marca:…
javascriptanswered Victor 1,539 -
0
votes3
answers1256
viewsA: How to do an INNER JOIN bringing everything from two tables and one more "max" in a specific field?
All you have to do is make a SELECT using the clause INNER JOIN, that works for a junction of two or more tables. Therefore, I will leave below an example of how you should do to join the tables…
-
0
votes2
answers957
viewsA: Error: Column Count doesn’t match value Count at Row 1
In this case of your INSERT the ideal serial change this line $sql = "INSERT INTO tb_produto…
-
1
votes1
answer640
viewsA: To assign value to the input field after selecting item in Select
From what I understand you want to catch the value of your field select and play for a field input if it’s not that, comment that I edit the answer to suit better <link…
-
0
votes3
answers2290
viewsA: Use database data in a select option (HTML/PHP)
To view database records within your select, should use a block PHP for that. In this way, as I will show below, where the value = 'nome_fantasia' will be stored inside the variable nome_fantasia…
-
-1
votes2
answers1773
viewsA: Format phone numbers and CNPJ
You can do it in several ways, I’ll show you the simplest one. There is a library of your own that you can "Import" through link . <script type="text/javascript"…
-
1
votes3
answers533
viewsA: Update button using jQuery
With this code using ajax that I will show below, you will not have refresh on your page, but your button will have to be type=submit and will also have to add a class within your tag <form>.…
-
0
votes2
answers255
viewsA: Error returning data from php + mysqli database
If you want to compare your tables in order to bring everything in select so I’ll show you a code on MYSQL using clause JOIN that basically unites / concatenates tables Try using this select inside…
-
-1
votes1
answer1331
viewsA: How to order a list in alphabetical order?
You must want something like this example I believe import java.util.Arrays; import java.util.Collections; public class HashtableDemo { public static void main(String args[]) { String[] companies =…
-
16
votes4
answers15459
viewsA: What is the difference between LIKE, IN and BETWEEN in Mysql?
Clause / opearador LIKE Clause / operator is used LIKE when you want to search a character, using coringa that is to say %, if you want to scan with characters that start with the word A the correct…
-
1
votes5
answers2297
viewsA: Store IF output in a variable to use later
Can do in both forms, both with IF and ELSE as ternary, I will put the two alternatives if ($status_os_cliente == "A"){ $os = "SIM"; } else{ $os = "NÃO"; } Ternary as the friends have already shown…
-
0
votes1
answer438
views -
0
votes2
answers57
viewsA: Information is not enough in the value attribute
Try to create a select in the table, because what you are doing has no sense, you are echo in virtually nothing, because there is no time_line defined as variable understand, therefore try an…
-
0
votes2
answers53
viewsA: I can’t get the seat
Everything indicates this passing POSTS that do not exist, after all your inputs have no name and your select also not. In your field <input type="text" class="form-control" ... > Make them…
-
5
votes1
answer4187
viewsA: When to use the OVER clause?
The function OVER from what I understand it determines the partitioning and ordering of a set of N lines before application of the associated window function. Defining a window or set of…
-
2
votes2
answers2310
viewsA: How do I get back to the form page when sending a message?
You have two alternatives, create an IF and ELSE to go back to the page you want, or create Javascript code for the page or redirect as the user gives Ubmit. 1st alternative // ENVIO DO EMAIL…
-
0
votes2
answers124
viewsA: PHP Web Service with INNER JOIN
I don’t quite understand you JOIN but I’ll post your code with a few things fixed, and if it doesn’t work comment on what’s going on First error: Right at the beginning you create a query in the…
-
0
votes3
answers153
viewsA: Database with php
Note that you created while correctly, but as While is going through all the records of your select, your line echo "$nome <br/>"; must also come within while for as long as it finds a name it…
-
3
votes7
answers19300
views -
0
votes3
answers4284
viewsA: Problem with special character "ç" in javascript
If you are displaying things that are not brought from the database you can use this tag in your HTML file, <meta http-equiv="content-type" content="text/html; charset=UTF-8"> Or if the case…
-
0
votes3
answers2563
viewsA: Connection to sql database on multiple php pages
Create a connection file instead of a function for this, I will show a way using a functional example php connection. <?php $servername = "localhost"; /* pode deixar localhost */ $username =…
-
1
votes2
answers168
viewsA: Error in cpf mask
Another way also to help, if you are using bootstrap, just do it in a very simple way. But to work it must have imported jQuery.Mask library <script type="text/javascript"…
-
2
votes1
answer248
viewsA: Countdown
var configMinuto; var configSegundo; var mostrarValor; var evento = null; var contador = null; var minuto = 0; var…
-
1
votes2
answers343
viewsA: submit a form when selecting a select option, without re-loading the page
Try this way but you will have to change your form by putting an id. and in your select do this <select name="id_seccoes" class="form-control" onchange="document.forms['dateForm'].submit();">…
-
0
votes2
answers538
viewsA: Different mysqli_fetch array output than the one running in phpmyadmin
Notice that you identify as $dados_usuario = mysqli_fetch_array($resultado_id, MYSQLI_ASSOC); conflicting with the mysqli_fetch_array with the specified parameter, which is MYSQL_ASSOC. The correct…
-
1
votes1
answer65
viewsA: Mysql Error - Stored Procedures
Your error is in your subquery, so try to change your previous one this way. CREATE (definer omitido) PROCEDURE `MULTAOFF`() BEGIN UPDATE aluno SET `StatusAluno` = '0' where CPF and StatusAlunos IN…
-
2
votes1
answer451
views -
0
votes3
answers3732
viewsA: How to place two Ivs next to each other in Bootstrap
I think you want to put your Abels next to each other, so here you go, if not this, comment that I edit the answer <!DOCTYPE html> <html lang="en"> <head> <meta…
-
1
votes3
answers75
viewsA: Why in the second example (unlike the first) the result is concatenated and not summed?
I think it was an inattention of yours, because in the first example you are concatenating the sentence with the variables correctly using the parentheses and making the program do the calculation…
-
1
votes3
answers68
viewsA: How is Join and WHERE made with multiple tables?
Just use the same logic as for a simple JOIN, only using LEFT OUTER JOIN Select A.id, A.matricula, A.username, A.curso_id, B.id_cursos, B.nome_cursos, C.id_modulos, C.nome_modulos, C.cursos_id,…
-
2
votes2
answers1083
viewsA: Change data without refresh with jquery
I believe you are trying to send data to the database without the page refreshing, because then if this is what I am thinking according to what I read in the question. There goes a script so you…
-
4
votes1
answer90
views