Posts by Jhonny Mesquita • 601 points
24 posts
-
4
votes2
answers824
viewsA: How to save two variables from a JS in php session?
In your "funcoes2.php" file add the line: $_SESSION['V1'] = $_GET['emp']; In your "tpago.php" file add the line: $_SESSION['V2'] = $_GET['uni']; That way, whenever your ". load()" loads the url, the…
-
1
votes1
answer210
viewsA: Because input does not appear in php Function output
Try the function like this: function geraInput($type, $name, $id, $required, $place, $titulo, $conteudo, $onlyread, $checked, $options, $primeira){ $inp = '<div class="env_inputs"> <span…
-
-1
votes1
answer215
viewsA: Problem calling method from a newly loaded class
To call a method straight from the class like this Teste.test() you need to change the line: public void test() throws ClassNotFoundException, InstantiationException, IllegalAccessException,…
-
0
votes2
answers72
viewsA: Margin , width ghost (google iframe)
If you’re using some CMS, e-commerce platform or something, then somewhere this code is being generated, and sometimes it’s hard to figure out where. Try adding the block below in your document:…
-
2
votes2
answers250
viewsA: Display sum in span
Create span element as: <span id="totalSpan">0.00</span> Change the line: self.total = self.container.querySelector("input[name='total']"); To: self.total =…
-
1
votes1
answer10125
viewsA: Input with states of Brazil and when selecting to show cities of that state
Select Rondônia, Maranhão or São Paulo. It’s just an example of how you could proceed, seeing that cities are not as well defined as states, and there are thousands.…
-
0
votes1
answer294
viewsA: removeClass Jquery
Follow the answer, can be executed here! $(document).on('click', '.page_video_content ul li a', function() { alert('lol'); $('.started').css('background', ''); $('.started').removeClass('started');…
jqueryanswered Jhonny Mesquita 601 -
0
votes2
answers571
viewsA: Variable Undefined
I think your problem is that you are trying to get an '#field' element that does not yet exist, and it is no problem with the 'counter'. You must have at least 1 "'#field'+counter" element to make…
-
0
votes2
answers90
viewsA: Update all table records with Sqlitedatabase.update()
Try changing the line: banco.update("CriarTreinoExercicio", valores,"ID=?",new String[] {id}); To: banco.update("CriarTreinoExercicio", valores,"ID=ID",new String[] {id}); Or to:…
-
1
votes2
answers707
viewsA: Returns database data in a Jtextfield
Substitute: Agenda a = new Agenda(); a.setId(Integer.parseInt(txtID.getText())); ga.selecionar(a.getId()); For: Agenda a = ga.selecionar(Integer.parseInt(txtID.getText()));…
-
1
votes1
answer176
viewsA: Doubt Google Charts with Loop
That block: while ($linha = mysql_fetch_array($consumo_atual)) { $v_data =$linha["Data"]; $v_consumo =$linha["Consumo"]; } must be: $v_data_consumo[] = array('DATA', 'CONSUMO'); while ($linha =…
-
0
votes1
answer979
viewsA: Open report in another tab
Try replacing: onclick="target = '_blank'" For: target = "_blank"
-
1
votes2
answers200
viewsA: How to select the foreign key id in the main table?
Replace the line: string sql = "Select * from Caminhao;"; For: string sql = "SELECT c.*, m.nome AS nomemotorista FROM caminhao AS c JOIN motorista AS m ON m.idmotorista = c.idmotorista"; In your…
-
0
votes1
answer205
viewsA: Free access to database table data for third party system
You could create an 'external user' user and guarantee this only access to reading the tables, without having to copy them or make any other changes. This way the other (external) system will have…
-
0
votes1
answer62
viewsA: Query scanning all records
After the line: $table = DB::table('empenho as emp') insert your 'Where' like this: ->where('nome_da_coluna_de_id', $id) Try this 'Where' there and replace 'Join' ('by 'leftJoin'('.…
laravelanswered Jhonny Mesquita 601 -
0
votes2
answers1181
viewsA: Select with duplicate record
Change group by to : group by s1.cod_empresa, s1.num_docum Do this and pass the feedback. I believe you solve.
-
2
votes1
answer140
viewsA: Jquery does not load effect obtained through a service
The archive "http://williamvillar.com.br/assets/js/materialize.min.js" must be loaded after the end of the ajax request, otherwise the elements will not have their listeners loaded, IE, does not…
-
7
votes1
answer6018
viewsA: What are the differences between the repeating structures while, repeat and for?
FOR - For a number of repeats already defined, or even when you need to count repetitions, and even when you want to read an array from the last to the first element. AS LONG AS - When your code has…
-
2
votes1
answer722
viewsA: Add values within the Two-Dimensional Matrix from the line the user chooses
Remove the "if(indicator...)" and use the block like this: for (int i = 0; i < matriz.length; i++) { for (int j = 0; j < matriz[i].length; j++) { soma = matriz[indicador][0] +…
-
1
votes2
answers1056
viewsA: Query for MYSQL with IF to validate several table fields
You could validate "If it has a value equal to the column or if it has an empty value": SELECT type, property_type, city, region, neighborhood, price, rooms, bathrooms, parking, content, img1,…
sqlanswered Jhonny Mesquita 601 -
0
votes1
answer194
viewsA: Make a table condition type in Mysql
You could create a trigger (Trigger) to run before entering the record in the table, like the example below, assuming you use the table "table_reservations" with the columns "quarto_id", "checkin"…
-
1
votes5
answers3267
viewsA: Php returns null JSON when it has accent in Mysql
Simplest solution found is to add these two lines: $str = str_replace('\u','u',$decoded); $strJSON = preg_replace('/u([\da-fA-F]{4})/', '&#x\1;', $str); Stay tuned to your PHP version, because I…
-
1
votes4
answers660
viewsA: Getting PHP variables via Javascript without reloading page
Assuming that the variable PHP $reference = "F014,F013,F015", this must be the code you are looking for (it is not possible to run here, because it has PHP...): $('a').on('click',function(){…
-
0
votes2
answers185
viewsA: Android app restarts if it gets out of focus for a while
For your application to keep data in the background, the best way I know is to use Service or Intentservice, which initiate Threads that will remain running even after the android 'kill' the…
androidanswered Jhonny Mesquita 601