Posts by Vinicius Maia • 110 points
13 posts
-
0
votes1
answer147
viewsQ: Delay in massive processing of ajax Codeigniter
My code imports data from one database to another. To avoid server overload, I am importing 100 out of 100 records into each ajax. I noticed that in the first requisitions, it takes about 40ms,…
-
0
votes1
answer78
viewsA: Oauth login does not work on mobile devices
I found it. Oauth is working, but I needed some additional settings. Go to http://developers.facebook.com/, and set your app login settings as follows: The last button is what causes you to…
-
0
votes1
answer63
viewsQ: I want example of why replacing ' with '' and for parameters of a query is dangerous
I see many posts on this subject, but I do not see any example that has fit for this my case. function sanitize($value) { $val = str_replace("'", "''", $value); $val = str_replace("\\", "\\\\",…
-
0
votes1
answer56
viewsQ: Array that is turning into object
When using the json Decode function on a json, I’m having a problem. When the numbering is perfectly in order(0,1,2,3...) it is classified as arra: [2016-08-01] => Array ( [0] => 07:00:00 [1]…
-
0
votes1
answer59
viewsA: How to count underage employees?
Most databases, the Where clauses accept more than one parameter. Cassi was the one who made this class select, make sure it accepts more parameters. This second paramatro would be: SELECT * FROM…
-
1
votes1
answer487
viewsA: Anchor link with js and bootstrap, how to close the menu after clicking?
If you are using jquery, create a function that by clicking turn the menu into display: None. $("#itemmenu").click(function (){ $("#iddomenuquevcquerquedesapareca").css ("display","none"); });…
-
0
votes1
answer75
viewsA: Calculate time interval in SQL
Your initial query is written with errors. The correct one would be >= and not =>. The field in which it contains the values of the times must be of the TIME type. Once that’s done, I see no…
-
7
votes1
answer1742
viewsQ: Is there a risk in using mysqli_insert_id?
Suppose a website with a relatively high flow. An X user inserts a record into the database at the same time as another Y user inserts another record. Whereas the procedure of this insertion of user…
-
0
votes1
answer68
viewsA: After searching with keyup() edit in Modal and return list with edited value?
Location.Reload() refreshes the current page. If you use this function you will lose the page data. In this case I advise you not to use Reload. Try this one: $('#save'). click(Function() { var data…
-
-2
votes3
answers714
viewsA: Is filter_var() sufficient to avoid SQL Injection?
I use a super basic function that simply takes the ' (apostrophe) and replaces it with two apostrophes (''), and takes the (backslash) and replaces it with . So there’s no way there’s any Injection.…
-
-1
votes2
answers1770
viewsA: INSERT PHP MYSQL does not insert
You are missing to tell mysqli_connect which database to use for this: mysqli_connect ($host, $user,$password, $bandodedice). Or in your query refer to the database to which you will use (Insert…
-
-2
votes3
answers9570
viewsA: Update DIV without refreshing the JQUERY page
To lock Submit use the return false; at the end of .submit (function (){}).
-
0
votes2
answers935
viewsA: Insert with ajax on onclick
Voca thinks it necessary to return a Json? You could simply put a $("#"+identify). html (data) and in the file that does your function you would echo into html. Example: echo "Success . This span…