Posts by David Alves • 2,470 points
112 posts
-
1
votes4
answers2496
viewsA: Performance of COUNT(*) and COUNT(1)
The difference is simple: COUNT(*) will count the number of records. COUNT(column name_name) will count the number of nonnull records.
-
1
votes1
answer66
viewsA: How do I check if a value already exists in my array?
Let’s say that your main array is stored in the $list_products variable, the new product you want to check is $new_id_product and the quantity of it is $new_product_qtd, the code to check this would…
-
1
votes2
answers5888
viewsA: Add button, insert input value inside the form itself
To do what you want, you must use javascript, the code below goes with pure javascript, but jQuery is also possible: function adicionarProduto(){ ingrediente =…
-
2
votes1
answer42
viewsA: What does Javascript take as default?
window.location is an object containing all information about the current document Location (host, href, ports, protocols, etc.) document.location is a synonym for window.location, but it’s been…
javascriptanswered David Alves 2,470 -
0
votes1
answer83
viewsA: SQL SUM() syntax error
Missing a return AS. Correct would be: SELECT SUM(IF(prodtype='typ2',price*0.6,price)) as soma FROM tbl_prods WHERE userId=123 AND YEAR(dt_trns)=2016 AND MONTH(dt_trns)=12;…
-
0
votes1
answer528
viewsA: Validation of Jquery/Ajax/PHP fields
You can do your job keyup validate the two by calling both ajax and thus validating as you wish. It would look something like this: $(document).ready(function() { $("#email").on("keyup", function()…
-
3
votes4
answers2886
viewsA: Convert HTML to PNG
You can use the imagegrabscreen() and imagegrabwindow() function, which allows you to create "screenshots" of the browser. See the comments in the manual to learn how to omit Chrome from your…
-
4
votes1
answer69
viewsQ: Does the size of the URL influence the rankings of search Engines?
If I have a link very long, this can be penalized by Google or other search systems? For example:…
-
1
votes3
answers9943
viewsA: ELO and Hipercard credit card validation bin
I received an e-mail from a credit card machine provider who gave me the following information about ELO "Below is the list of Bins ELO: If you use the Bins interface for internal control, we…
-
2
votes3
answers9943
viewsQ: ELO and Hipercard credit card validation bin
I’m developing a validation in. js for a webcommerce in order to identify the flag of the credit card entered by the customer without having to select it. I searched several places, contacted the…
-
1
votes4
answers286
viewsA: Put Required in function
In his <script> you can try the following code beyond the message you return: <script> function myFunction() { var x, text; // Get the value of the input field with id="numb" x =…
-
0
votes1
answer43
viewsA: List the Result of a Query
This is probably happening because your code does not know what $this->User is. On the line $this->modelo('Usuario'); you could put $this->Usuario = $this->modelo('Usuario');…