Posts by Marcelo Diniz • 3,356 points
116 posts
-
3
votes1
answer771
viewsQ: Keep table with minimum height size
I’m creating a table using the Datatables, but would like to keep a minimum height even when you have at least one record. <table id="example" class="table table-striped table-bordered"…
-
1
votes1
answer1390
viewsA: How to remove events from Fullcalendar?
In this case, you will have to make some call by ajax, for example, to a controller in your php, for example: eventClick: function (calEvent, jsEvent, view) { $.ajax({ url: 'calendario.php', data:…
-
4
votes5
answers2967
viewsA: Take all the names and put comma to separate them
It could be so: while ($listintegrantes = mysqli_fetch_array($query1)) { $integrantes = "$integrantes" . $listintegrantes['nome'] . ","; } $integrantes = rtrim($integrantes, ',') . '.';…
phpanswered Marcelo Diniz 3,356 -
2
votes1
answer239
viewsQ: How to pick up a clicked multidimensional checkbox
I have a checkbox group and I need to get the checkbox that the user clicked, with this, I need to manipulate others who are from the same group. <input type="checkbox" name="grupo[1][1][]"…
-
2
votes2
answers4279
viewsQ: Export data to Excel using PHP Excel
I’m using the library Phpexcel to export some data from the database. My problem is in relation to some types of data that it puts a simple quotes at the beginning of the number and/or dates '. In…
-
1
votes1
answer139
viewsA: Multiple update in a configuration table
I imagine you will have to run the 4 separate updates even, this is because each one changes in different searches (Where), but to not have 'orphaned' data you can use mysql transactions…
mysqlanswered Marcelo Diniz 3,356 -
2
votes1
answer1198
viewsQ: How to print/export (pdf, xls, printer) the graphics from google Chart?
I created a screen with several graphics using google Charts, but I need to print/export to pdf, xls, printer, only from everything I searched on the net I haven’t found anything yet, does anyone…
-
0
votes1
answer391
viewsA: Update field in multiple columns
From what I understand you are wanting to save the sort you put for each item (category), but the first mistake I see is in your view. You must enter the name and id of the field with [] <?=…
-
13
votes6
answers32107
viewsA: What is Vanilla JS?
Javascript purer than this one doesn’t have many around, no website when you download what comes is a file called vanilla.js with nothing.…
-
0
votes1
answer1170
viewsQ: How to fetch a value between a past range
I have to find out if the value (5.55 for example) exists in a matrix and know in which range of that matrix this, and bring me the id of the range. I had taken a test and it seemed to be working…
-
0
votes1
answer1461
viewsQ: How to multiply or add php values?
I have an array with values and a variable that will inform whether to multiply or sum the values of this array, to make the sum user o array_sum, now has some function to multiply? I did so, but I…
phpasked Marcelo Diniz 3,356 -
2
votes1
answer3036
viewsQ: How to send more than one value in a select element of the html form?
I’m creating a form and for some fields I need to submit more than one value and I don’t know if the form I’m doing is the best or not. <select name="itens[]"> <option…
-
1
votes2
answers950
viewsA: Run Cronjob Codeigniter
Follow the manual link for this http://www.codeigniter.com/user_guide/general/cli.html. on my site I left to run like this: 0 1 * * * php /var/www/meusite/index.php principal listaCron but on the…
-
1
votes2
answers51
viewsA: How to do two checks in select
I wouldn’t put those else's initially, to help already create the variable $w_query with a value 'Where 1=1' (Pog, but it helps a lot) and would be something like this, I didn’t test and I don’t…
-
8
votes2
answers1335
viewsA: Calculation percentage of hours
In that case, I think you should convert the times to seconds and then do the calculation. $tempo_total= "00:10:00"; $empo_realizado= "00:05:00"; $tt = time_to_sec($tempo_total); $tr =…
phpanswered Marcelo Diniz 3,356 -
1
votes1
answer1543
viewsA: Dynamic form using Bootstrap Tabs
From what I understand you want to make a call from a page via ajax by clicking on one of the tab, that’s it? If it is, take a look here : http://getbootstrap.com/javascript/#tabs…
-
4
votes8
answers64831
viewsA: How to check if a checkbox is checked with PHP?
One thing you may also have that I haven’t seen is if you don’t pass any value, for example: <input type="checkbox" name="meu_checkbox" checked="checked"> for example, if you send by post, in…
phpanswered Marcelo Diniz 3,356 -
0
votes2
answers519
viewsA: How to replace from one server to another?
Seen in the documentation, I could see that this passing no data to be "inserted", so I imagine that could be like this: $result = mysqli_query( $db_connect1, "SELECT * FROM trad" ); mysqli_query(…
-
1
votes2
answers690
viewsQ: Document.location.Reload() does not re-post equal to page refresh
I had to make some changes to a part of the system, and in that part before I was passing the data only by GET, but now I can go through both GET and POST, but I’m having a problem with the…
-
6
votes2
answers1061
viewsQ: How to send data from a php filter with multiple search fields
I am creating a filter page, but this page will have many fields for the user to fill, select and this will make a search in the bank mysql and will return the data to the user on another page. One…
-
2
votes2
answers674
viewsA: Codeigniter - Query in DB
From what I could see, this error is because you are not passing the variable to the view, this should be done from your controller, and I don’t know if I’m right, but this part is from your correct…
-
4
votes1
answer5057
viewsQ: Popover or Tooltip Bootstrap with long text
How to display a long text with breaks in a Twitter Bootstrap Popover or Tooltip? And there’s one more problem, Popover only opens at the second click! Does anyone know why? What I did:…
twitter-bootstrapasked Marcelo Diniz 3,356 -
0
votes3
answers212
viewsA: Error at end of Symfony installation
After a few more searches, I saw that this error was giving because I had nothing configured on routing.yml and so what I did was create an example page php app/console generate:bundle…
-
0
votes3
answers212
viewsQ: Error at end of Symfony installation
I’m willing to learn Symfony and then did the installation as they speak on the site: composer create-project symfony/framework-standard-edition meuprojeto/ '~2.5' Until then did the installation,…
-
2
votes5
answers1449
viewsQ: Sorting in query - Leave last registration in first and then sort by a field
I’m having to create a query that returns the data ordered by a specific field, for example name, but the first return line should be the last id. You can do this with sql? Let’s assume I have the…
-
6
votes2
answers825
viewsA: Block PHP page to only display data if it is an AJAX request
What you can verify is in relation to HTTP_X_REQUESTED_WITH if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') { // se entrar aqui é…
-
3
votes2
answers5179
viewsQ: Return all data from the first to the last day of the month with mysql
I am searching a table in my database that needs to return all the data that was created in the current month (I will run a cron on the last day of the month at 23:00). I have in my table a field…
mysqlasked Marcelo Diniz 3,356 -
1
votes1
answer342
viewsA: Request Ajax Codeigniter
What you can do is create a file MY_Input.php within application/core <?php class MY_Input extends CI_Input { /** * Clean Keys * * This is a helper function. To prevent malicious users * from…
-
3
votes2
answers794
viewsQ: Changing an element with jquery
I have a list of items and each item on that list is a link with a lot of attributes and items within that link. summarizing my link like this: <a href="#" class="editItem list-group-item"…
jqueryasked Marcelo Diniz 3,356 -
2
votes1
answer532
viewsQ: CSRF validation giving error after a time without use
I have an application already running with codeigniter and I have csrf enabled in the system. The problem is on a page that has a form that sends to itself, is a filter, but it is the following, the…
-
3
votes3
answers800
viewsQ: List every month in an intevalo, or in the query or in the programming?
I’m making a chart that lists a certain amount per month, but can have mès that has nothing, with this returns me no value and does not list in the chart. I don’t know if I should make the change in…
-
2
votes2
answers1328
viewsQ: Export php data to xls from a link
I’m making a link, that when the user clicks on it should generate an xls file. The link has the data-attributes and must pass these attributes to the.php page and generate the xls. I tried to do…
-
1
votes2
answers2001
viewsQ: Create a link with data and go through post
I do not know if it is possible, but I would like to create a link (or simulate one) where I need to pass data to the page of this link, but I would not like to pass this data by get rather than by…
-
1
votes1
answer204
viewsQ: Slowness with group_concat in mysql
I am developing a system, that in some parts, when I will display the data to the client, I am using in my query group_concat, because I need to display for an item the items related to it in the…
mysqlasked Marcelo Diniz 3,356 -
2
votes1
answer259
viewsQ: Join with Codeigniter Active Record
I made a query that is running ok and I am passing to the Active Record of Codeigniter but it is not working because of a Join that is a bit out with conventional, does anyone have any idea what…
-
1
votes2
answers5780
viewsQ: Perform an action after the change has been made
I do not know if there is such a possibility, but I would like to know if it has to execute a certain action after the action of change of a select. Let’s assume I have one select thus: <select…
-
5
votes3
answers12958
viewsA: Generate Excel with php query
Yes, it is possible. One possibility is to create a button to export, when the user clicks on this button you will have to form your html table the same way it generates for the view but you have to…
-
1
votes1
answer2700
viewsA: How to change validation text according to each type of validation in the Start Date field
What I usually do is what is recommended on jQueryValidate’s website is the following: $("form").validate({ rules: { qtdPFContratado : { required : true, number: true } }, messages: {…
-
1
votes2
answers82
viewsA: Remove array schedules if you do not meet a certain number of required periods
Solution I’ve achieved so far: $arrHoras = array( 2 => "09:00", 3 => "09:30", 6 => "11:00", 7 => "11:30", 10 => "13:00", 11 => "13:30", 12 => "14:00", 13 => "14:30", 16 =>…
-
0
votes2
answers82
viewsQ: Remove array schedules if you do not meet a certain number of required periods
I have an array with available schedules, being these schedules in a 30 minute interval: $arrHoras = ["08:30", "09:00", "09:30", "10:00", "10:30", ... , "18:30", "19:00"]; After some filters that…
-
0
votes2
answers182
viewsQ: Layout error, scrolling left when there is line break
I have in a part of a website, a selection of the hours. I’m just trying to get past the layout, and the guys thought it was a mistake and I’m not sure how to fix it. Following example image, if you…
-
1
votes1
answer1370
viewsQ: Return only one item related to the main table
I have two tables, respostas and respostas_log, where I store information of the answers in answers and some others that have to go logging in reply_log. I am needing in my SELECT to bring only the…
-
2
votes1
answer474
viewsQ: Clear fullcalendar background
I’m using the fullcalendar to a system where the user clicks on a day to mark an agenda. I need to leave the background of the day clicked with a certain color and this I found in the documentation…
-
1
votes4
answers2542
viewsQ: Error accessing Amazon EC2 instance via ssh
I am trying to access an Amazon EC2 instance via ssh from my linux-Ubuntu. I already created the machine in the console of Amazon, I created a key pair , hence what I did (so I understood I had to…
-
7
votes1
answer1593
viewsQ: Relationship between state, city, municipality and district
I downloaded an IBGE xml file with data from states, cities, municipalities and districts. I separated it into 4 tables and made their relationships. Follow the Sqlfiddle My question is: It’s right…
-
0
votes4
answers1039
viewsA: Error while displaying video html
I don’t know, but I did a test and it worked normal here. Just for testing, try to access without base_url, try direct Look at a Jsfiddle test…
-
3
votes1
answer1892
viewsQ: Automatically select a select and press the button
I got a field like <select>/<option> that when the user selects a value I call a function to popular another <select>, type the state and city combos, this is working, and then the…
-
1
votes1
answer250
viewsA: Error while uploading videos to Codeigniter
I don’t know which version of your Codeigniter you are using, but check the mime-type of the file you are sending. If you are using version 2.3 you do not have mp4 in the list of valid mimes as can…
-
2
votes1
answer174
viewsQ: Sorting data from one column to another
I am setting up a hierarchy and everything is working correctly, I just have a small problem, in the ordering of the data. Follows the structure of the table. (as basic as possible) create table…
-
3
votes2
answers3675
viewsA: Use jQuery function only on @media screen and (max-width:960px)
One way that can be done is by using the window.matchMedia. For example: if (window.matchMedia('screen and (max-width: 960px)').matches){ document.write('<script…