Posts by Marcelo Diniz • 3,356 points
116 posts
-
0
votes1
answer40
viewsA: Why are the values repeating if there is no data in the database?
From what I’ve seen you just need to change where this entry by selecting the $status variable in this part of the code <?php $diasValidos = $this->db->get_where('school_days',…
-
0
votes1
answer99
viewsQ: Entity database modeling for history
In the system I am developing there are several parts that will need data history. As I did so far it was, for when you need a history for a table I created another table with the same fields and…
-
0
votes1
answer35
viewsQ: Change default value of a function parameter
I’m migrating a system made in Codeigniter from version 2 to 3, I’ve done most of the steps that the manual but there’s one of them that I have a question, the step 11, because it says that some…
-
0
votes1
answer58
viewsQ: Difference in whether or not to use the term Function
I’m starting the study with Vue.js and I came across a situation within one of the options and I imagine it serves other options that is the use of the term Function, for example: var vm = new Vue({…
-
1
votes1
answer139
viewsA: Call Procedure with Oracle return in Codeigniter
You can call using the call_function $this->db->call_function('P_VERIFICA_VALORES'); or in your case, passing the values $this->db->call_function('P_VERIFICA_VALORES', $param1, $param2,…
-
-1
votes1
answer23
viewsQ: How to adjust grids to always have the same height space
I am creating a screen with bootstrap that will have several items panel But the way I did, it only fits well on the screen if the content is the same height, something that will not always happen,…
-
0
votes1
answer463
viewsA: How to receive id’s in the controller/model
So in order to be sent multiple selected items you should put as an array like this: <select multiple class="form-control" name="id_usuario[]"> I imagine you’re working with routes, not to…
codeigniteranswered Marcelo Diniz 3,356 -
0
votes1
answer479
viewsA: Search data between a period in a table with start date and end date fields
After a discussion in other groups, I reached a solution, follows: SELECT * FROM dados WHERE dt_inicio <= '$dt_fim_busca' AND dt_fim >= '$dt_inicio_busca' With the examples given to…
-
0
votes1
answer479
viewsQ: Search data between a period in a table with start date and end date fields
I’m having a problem searching for data in a table with start date and end date fields between a period (a - up filter) The sample data are: ID - INICIO - FIM 1 - 01/01/2017 - 31/12/2017 2 -…
-
0
votes1
answer1360
viewsQ: Problem adding month to a php date
I’m having a certain problem adding months with php, had done using the Modify but as in the documentation itself already informs that of the error, then I tried other 3 functions I found and then…
-
0
votes0
answers26
viewsQ: Why did I need to pass this as a function parameter?
I tried to put a piece of code for a function, to repurpose the code, it worked, only I had to pass the this as a parameter, I do not know if it is correct to do this. Follow the code as it was and…
javascriptasked Marcelo Diniz 3,356 -
0
votes2
answers181
viewsA: How to automatically generate fields
I don’t even want to go into the details of doing SELECT on the view, but let’s go. Is making the loop (while) inside the <li> in case, it should be out of it right, like this: <ul…
-
0
votes1
answer83
viewsQ: How to take care of status in one part of the system?
One question I have is how to take care of the status of a part of the system. So, let me give you an example, I have a question table and an answer table for that question. In these tables I have…
asked Marcelo Diniz 3,356 -
0
votes1
answer397
viewsQ: Error in passing parameter to a Shell Script
I am creating a script to take some images in the folder and with that generate another image, I am using Imagemagick, but the problem I am having is in passing one of the parameters of this script…
-
3
votes1
answer3228
viewsQ: Problems with entering data in the float field in MYSQL
I have a problem when inserting a value in a field in the table, this field is like float(15,6). I ran an Insert here INSERT INTO valores (valor) VALUES ('1160.480000'); Why it inserts the value as…
-
1
votes1
answer111
viewsQ: What better way to resolve the slowness of reporting?
At a time, I developed a page of reports, users have an option of filters, this working, but as the data in the database are growing this getting slower and do not know what is the best option to…
-
0
votes1
answer21
viewsA: When using fnReloadAjax does not remain on the current page
For that question I even opened one Download on the github about this problem in plugins page Datatables also and there suggested me to use the method ajax.Reload() and that’s what solved my…
ajaxanswered Marcelo Diniz 3,356 -
0
votes1
answer21
viewsQ: When using fnReloadAjax does not remain on the current page
I’m using the fnReloadAjax for when the user does some action in the table that is mounted using the datatables already reload the data again, only it does not remain on the current page. It keeps…
ajaxasked Marcelo Diniz 3,356 -
4
votes2
answers440
viewsQ: How to automate merge into git / github with hook or other tool?
I have a repository on Github and I created a Github page for that repository. So, every time I make changes to the branch master, I need to get into the branch gh-pages, make a git merge master and…
-
1
votes1
answer664
viewsQ: How to extend Ci_controller to more than one core?
In Codeigniter you can create a file in the application/core folder MY_Controller.php and the controller extending this file, a basic example would be: <?php class MY_Controller extends…
-
1
votes0
answers130
viewsQ: Problem with parameters passed to Phplot by Codeigniter Controller
I’m having a doubt that at the same time is being a problem, because I don’t know what I might be doing wrong. The thing is, I’m using Codeigniter and to generate a graph I’m going to use the…
-
1
votes1
answer1010
viewsA: Decrease columns Chartjs Bar Chart
What I might have found in the documentation was the xAxes option. options: { scales: { xAxes: [{ categoryPercentage: 0.9, barPercentage: 0.7 }], ... } as can be seen in this example…
chartjsanswered Marcelo Diniz 3,356 -
1
votes2
answers73
viewsQ: Jquery accumulating events
I have a problem in a listing, is the following, I have a table, for each row has a link to be able to edit the line, with this, when clicking on this link opens a bootstrap modal with all its…
-
0
votes2
answers857
viewsQ: How to check if a website is registered?
How can I check if a particular domain (DNS) is available for registration? Basically what I need is to do a WHOIS query. I will make this query in PHP.
-
1
votes1
answer1070
viewsQ: How to count NULL type values in Mysql
I have a simple table with the answers, in this table I can have answers with value null, 0, 1, 2, 3, ... , only when I count the number of responses with each value these with the value null does…
-
0
votes2
answers47
viewsA: How to pick the right date for the next event
I managed to solve the problem as follows <?php $regra_frequencia = '0,1,0,1,0,1,0'; $dow = explode(",", $regra_frequencia); $dow_now = date('w'); $dow_repeat = array(); $intervalo = 2;…
-
0
votes2
answers47
viewsQ: How to pick the right date for the next event
I have a list of days of the week that shows when an event should occur and another variable with the interval that should occur that event, for example, if in the list is 0,1,0,1,0,1,0…
-
1
votes1
answer344
viewsQ: Select2 display optgroup value and concatenated option
I’m creating a selection field where the user can choose between multiple states, but I need to show when selected both the optgroup value and the option value, have as? Remembering that I am using…
-
8
votes2
answers955
viewsA: Paint table row when receiving specific data
Can make a if on the tag tr. <tr <?php if ($objProg->getdest() == 'SP') { echo 'class="linha_destaque"'; } ?> > and creates a highlighted string class in css .linha_destaque{…
-
0
votes3
answers8281
viewsA: How to delete structure and data from mysql database
Oops, I found an answer in the SOEN, from a look. https://stackoverflow.com/a/8912749/2161286, I imagine it helps you. drop mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e…
mysqlanswered Marcelo Diniz 3,356 -
1
votes2
answers1101
viewsA: Bootstrap Responsive no break for bass line
I imagine that the problem is to be putting in a tag p, I made a small change and see if it resolves. <div class="welcome-content row"> <figure class="col-xs-12 col-sm-12 col-md-6">…
-
2
votes1
answer591
viewsA: Can we use {variable} in Codeigniter Views?
The codeigniter has a parser library for that it needs, take a look http://www.codeigniter.com/user_guide/libraries/parser.html And for the purpose of leaving here as it would be is something like…
-
1
votes1
answer215
viewsQ: How to keep user view choice in fullcalendar
I have a system that uses the fullcalendar , depending on what the user is currently using it prefers a type of visualization, for example month, depending on what he is doing he prefers another…
-
4
votes1
answer605
viewsQ: Search for the option title using select2
I have a select element and I need to search the items (options) not only for the text, but also for the title (or any other attribute), I have already been able to put the title to appear when…
-
2
votes0
answers85
viewsQ: How to know which files and folders are not being used?
I have a web template, and it has several image files, css and js. My question is whether I know which files are not being used without I have to open each html, css and js to know what is related…
templateasked Marcelo Diniz 3,356 -
2
votes5
answers1552
viewsA: Restriction of words in comments
In Codeigniter you have the text helper that has a function word_censor that removes or changes words from a text, you can only use this function in your application. /** * Word Censoring Function *…
phpanswered Marcelo Diniz 3,356 -
3
votes4
answers814
viewsQ: Repeat alphabet similar to excel columns
I am creating a function that returns the alphabet to me in an array according to the size of columns passed. At first I was only making a loop using the range("A", "Z"); but when I had more than 26…
-
1
votes1
answer220
viewsQ: Send form after user action
I have a form, and a list of actions that the user can choose, depending on the action that was chosen, the user must confirm the submission, leave a message or simply send the form. I have almost…
-
2
votes1
answer3467
viewsQ: Save php array to mysql database
I am needing to save an array in a field in the database table and would like to know how best to do this by using the serialize() and unserialize() or json_encode() and json_decode(). I know you…
-
1
votes2
answers1833
viewsA: Dynamically execute model class method from an ajax request to the controller
What I usually do when I make an Ajax request is to call the controller, the controller requests the data, so I play it in a view or in a json to return the data to the ajax request. html example:…
-
3
votes1
answer106
viewsQ: Upload large or compressed files?
I have a problem sending files to the server for large files and an idea was to send some of them in compressed form .zip. Is there any problem in leaving open the part of upload so the user can…
-
1
votes1
answer280
viewsA: Site_url does not work in Codeigniter
You must load the url helper, either in autoload or in the controller: If it’s on autoload application/autoload.php look for $autoload['helper'] = array('url'); If on the controller…
codeigniteranswered Marcelo Diniz 3,356 -
5
votes1
answer13715
viewsQ: Undoing a pull in Git
I have a project and at the moment I have 3 branches, the master, one dev and one that I needed to create in parallel to the dev for a funcionalidade the part, so far no news, my problem was that…
-
3
votes1
answer566
viewsQ: Improve table header view using bootstrap 3.0.0, datatables and fixedHeader
I’m using in a system the bootstrap, datatables and fixedHeader, I’m in three trouble: I would need that header (thead) table stops before the end of the menu, gets below the menu, it’s stopping at…
twitter-bootstrapasked Marcelo Diniz 3,356 -
1
votes3
answers644
viewsA: Data Datepicker - Processing
I usually treat this data on the server side, and using PHP I do so: <input type="text" name="minha_data" id="minha_data" class="form-control data datepicker" value="<?php…
-
16
votes2
answers7274
viewsQ: Difference in result between Mysql 5.5 and Mariadb 5.5
I have a query running on my site that is installed the Mysql 5.5.43, but when I went up on the server (which has the MariaDB 5.5.38 and I only came to know now) the query does not return the same…
-
1
votes1
answer771
viewsA: Keep table with minimum height size
As stated in the comments, the answer to the question follows as I resolved. In CSS I put #example{height: 250px} and with that already solved the problem. Here is an example from…
-
0
votes4
answers2235
viewsA: Codeigniter and . htaccess in subfolder on server
I usually leave mine application/config/config.php thus: $config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); $config['base_url'].= "://" .…
-
1
votes2
answers1675
viewsA: Sending an email programmed with PHP
Many systems happen this, have an event that will be on a specific date and have to fire an email at a certain period before to notify. What I did was create a cronjob and this routine of mine calls…
-
1
votes1
answer1261
viewsA: How to recover Codeigniter session data directly from database?
What I did once was take the data from the table ci_session where user_data was different from empty and listed these data, I know it’s not quite what you’re looking for, but I think it should give…