Posts by Godfrey the King • 483 points
17 posts
-
0
votes1
answer331
viewsA: now() date/time format in mysql
The function NOW() returns the current date and time in the time zone set as a string or number in the format YYYY-MM-DD HH: MM: DD or YYYYMMDDHHMMSS.uuuuuu. The type returned depends on the context…
-
1
votes2
answers69
viewsA: Creating rule to create time based on delivery rate
Hello, He is "always adding up the middle option" as part of the declarations if, if e else if you are performing an assignment operation and not comparing between values. Do the following:…
-
2
votes3
answers62
viewsA: My dropdown doesn’t matter bank options
<?php require 'conn.php'; $query = mysqli_query($connection, "SELECT NOME FROM colaboradores"); ?> ... ... <select class="form-control" id="COLABORADOR" name="COLABORADOR">…
-
3
votes1
answer2267
viewsA: How do I make get and post requests through Curl?
You can do the following: $url='https://receitacpf.cf/api/cpf/NUMERODOCPF'; $ch = curl_init($url); $request_headers = array(); $request_headers[] = 'Accept-Encoding: gzip'; $request_headers[] =…
-
0
votes5
answers676
viewsA: Individual methods or parameters in Mysql queries?
Yes, there is a difference in execution however minimal it may be. It happens for the reason that the get_collaborators() be executed, will have 3 different evaluations to be executed: if, elseif…
phpanswered Godfrey the King 483 -
0
votes3
answers62
viewsA: Get only 1 of each journey
As you have not described how is modeled the table(s) you want help from, for you to select only one record with the same journey number do: SELECT param1, param2, param3 FROM myTable WHERE jornada…
-
2
votes1
answer59
viewsA: Access to PHP objects on other pages
More simply, you can store the created instance of your object Usuario in a session (PHP documentation for session functions) and access them on the desired page. See below: While on the page…
-
1
votes1
answer60
viewsA: Parameter by Ajax
According to the jQuery documentation you need to send data in format Plainobject, String or Array. data Type: Plainobject or String or Array Data to be sent to the server. It is converted to a…
ajaxanswered Godfrey the King 483 -
1
votes1
answer2801
viewsA: MYSQLI - Trying to get Property of non-object in
You are getting this error because you are trying to call the function num_rows() on top of a query UPDATE. If you want to recover the amount of lines that have been updated with the UPDATE, utilize…
-
1
votes2
answers190
viewsA: Create object and send by ajax - Codeigniter
To turn your entire form into JSON Object format, do: var formulario = JSON.parse(JSON.stringify($('#form').serializeArray())) Now you can access each item of that object and treat it the way you…
-
3
votes5
answers3455
viewsA: Change HTML document to PHP
Mikaela, imagine you have a file called index.html with the content described below: <!DOCTYPE html> <html> <head> <title>Aprendendo HTML e PHP</title> </head>…
-
3
votes4
answers559
viewsA: Function has screen in real time, hangs the screen with time!
One of the most serious problems that is causing the crash, is that you, every 4000 milliseconds (4 seconds) are opening a new connection to the database! That’s why he gets overwhelmed with time.…
-
0
votes3
answers2326
viewsA: Check if html page exists HTML/Javascript
You did not specify if you want to check if the page belongs to the same domain and if you want the answer using jQuery... Anyway: function checkPage() { // Colocar aqui a url. var url = '' var xhr…
-
2
votes1
answer45
viewsA: I cannot succeed when making a request via ajax
First we need to check which error is being generated in the request. To URL is correct? The path is correct? Replace your Ajax function with: $.ajax({ type: "POST", url:…
-
1
votes2
answers654
viewsA: Change the table row icon when you click dynamically?
To do this, you will need to assign your datatables table to a variable: var datatable = $("#minhaTabela").DataTable({...}); When you click on the third icon: datatable.on('click',…
-
1
votes1
answer619
viewsA: What’s the command to cut paper on the Bematech MP-2100 TH?
According to the documentation of Bematech itself: Bematech minimpressor models that feature this feature are: MP-2100 TH, MP-4000 TH and MP-4200 TH and MP-2500 TH launches. Both have the same…
printeranswered Godfrey the King 483 -
2
votes4
answers183
viewsA: Pdostatement::rowCount returns -1
According to your comment, you are getting -1 when running $stmt->rowCount(). This indicates, that the query - in your case a INSERT - was invalid. What does this mean? Probably some parameter…