Posts by NovoK • 708 points
12 posts
-
1
votes1
answer31
viewsQ: Different result in order by with limit
I have problems with the information obtained in 3 queries. First a normal select sorted by date: select id from app_order o order by o.date ; // 30558, 30559, 30560, ... Then one that should bring…
postgresqlasked NovoK 708 -
3
votes1
answer1173
viewsA: Javascript function to catch the next date of a calendar
Check the methods of the Date objects, with them you can, take the current date, add days and/or months and use the new date. I think in your case, just take the current date and add one day, you…
-
5
votes4
answers114
viewsA: Why is this SQL statement incorrect?
SELECT * FROM produtos WHERE categoria = 'Vestidos' AND (cor = 'Branco' OR cor = 'Rosa')
-
4
votes1
answer60
viewsA: Sum of strings in PHP and Javascript
PHP and javascript have different operators for the operation of concatenating strings. In javascript, use "+"; in PHP, use "." echo SHA1('ABCDE' . substr('ABCD', 0, 32));…
-
1
votes3
answers780
viewsA: Select data and display
while is assigning function return "fetch_object" the variable "$customers" (tip: use "$customer"). The "fetch_object" function returns as object a query result line, therefore; added to while, it…
-
4
votes5
answers42558
viewsA: How to delete data from a table with dependencies in other tables
SET foreign_key_checks = 0; // Delete o que tiver que deletar SET foreign_key_checks = 1; // Ative a checagem novamente
-
1
votes2
answers633
viewsA: Mysql Query in PHP only works locally
Access denied for user... Are you saying that the user you are using has no access. Check the access data (host, user and password), the server configuration should be different from your local…
-
0
votes2
answers4655
viewsA: How to apply bold to a manually created PDF document text snippet?
I found this page, which is the documentation of a library called VBPDF, is talking about how to use bold, italic and such... Behold: VBPDF set font…
-
3
votes7
answers16282
viewsA: Understanding the JSON file
{ "nome": "Kadu", "idade": "25" } This is an Object that stores a name and an age. { "pessoas": [ { "nome": "José", "idade": "80" }, { "nome": "Maria", "idade": "60"} ] } This is an array of people.…
-
0
votes6
answers6049
viewsA: How to make a textbox that updates every time you change the content?
You can use requests Ajax along with the change field, but it is better to fire the request based on a click from a save button, imagine accessing the database every letter the user type, this would…
-
0
votes3
answers3483
viewsA: How to execute a code by clicking on a link?
When the user selects the product, you can make an AJAX request to check if it has balance, based on the check you can (or not) show the alert. Behold : Jquery Ajax…
-
36
votes3
answers72494
viewsA: How can I check if one string contains another in Javascript?
Use the function indexOf: var s = "foo"; alert(s.indexOf("oo") != -1); The function indexOf returns the position of a string in another string or -1 if it does not find.…