Posts by Adriano Silva • 178 points
26 posts
-
0
votes1
answer137
viewsA: How to save the data by removing the characters from Mask using Laravel 5.6?
Only convert number before saving to database with function: NumberFormatter::parseCurrency() $formatter = numfmt_create('pt_BR', NumberFormatter::CURRENCY); $produto->custo1 =…
-
1
votes1
answer68
viewsA: HTML in DB with Laravel 5.8
You need to use {!! $text !!} More details on https://laravel.com/docs/5.5/blade#Displaying-data…
-
0
votes2
answers120
viewsA: What is the difference between the preg_split and the explode?
Both are used to divide one string in a array, the difference is that split() uses the "Pattern", while explode() uses string. explode() is faster than split() because it does not correspond to…
phpanswered Adriano Silva 178 -
1
votes2
answers678
viewsA: How does this < base > HTML tag work?
The tag serves to define the URL and Target that will be default for the entire page. With this all image paths and links inherited the path that was set in the href attribute set in the base tag.…
-
0
votes1
answer68
viewsA: date_diff returns incorrect difference
The Dateinterval::format() method does not recalculate transport points in time sequences or in date segments. This is expected because it is not possible to exceed values such as "32 days", which…
-
-1
votes4
answers3746
viewsA: Insert html file via javascript
Try to do that! <head id="header"> </head> <script type="text/javascript"> $(document).ready(function(){ setTimeout(function(){ $("#header").load("header.html"); },0); });…
-
0
votes1
answer197
viewsA: Edit Image Upload with Ajax and Codeigniter
Create an Hidden field with the value of the photo, and when you update the data you check if the photo has been uploaded ($file_photo = $_FILES['file_field_upload']['tmp_name'];) Now you create a…
-
0
votes1
answer64
viewsA: Trying to get Property of non-object error using codelgniter
Your object is inside an array item, in which case you can call it directly by the key. do so echo form_input('titulo', set_value('titulo', to_html($noticia[0]->titulo)));…
-
0
votes3
answers2299
viewsA: limit no codeigniter
If it’s in Mysql you can use it like this: $this->db->limit(0, 5); // Produz: LIMIT 5, 0 (no MySQL. Outros bancos de dados possuem uma sintaxe ligeiramente diferente) This way it works for all…
-
2
votes2
answers3383
viewsA: How do I make a website responsive with or without bootstrap?
Use Media Queries. Media Queries sets conditions for CSS to be used in specific scenarios. If these conditions are approved, that is, if the device fits all the conditions set out in your Media…
-
0
votes2
answers792
viewsA: codeigniter - list related data
Do it like this: Model public function get_events() { $this->db->select('*'); $this->db->from('events'); $this->db->join('channels', 'events.channel_id = channels.id');…
-
1
votes1
answer147
viewsA: DATATABLE CODEIGNITER - INNER JOIN QUERY
Do it this way here in your Model class, I’ve had this problem and solved it with this. private function _get_datatables_query($term = '') { $column = array('p.nome', 'p.cargo', 'f.datap',…
-
0
votes2
answers26
viewsA: Check that the column value is "Base"
Do it like this: $name['mytable'][0]->mycolumn == 'meuvalor'
-
1
votes1
answer415
viewsA: Menu does not appear in mobile version
Use Media Queries in your CSS, to take away the margin-top of your div, which is above the menu, in the mobile version. @media (max-width: 575.98px) { #kit{ top:0%; margin-top: 0px !important; } }…
-
0
votes1
answer25
viewsA: How to specify a HEXA color in Mspaint?
MS PAINT only accept RGB, you will have to convert from RGB to HEXA.
-
1
votes4
answers4522
viewsA: Count number of records in a Mysql table with PHP?
Just do it that way here. $sql = "SELECT * FROM usuarios"; $resultado = count($sql); echo $resultado;
-
0
votes2
answers389
viewsA: Redirect to another Codeigniter application
Controller Site 1 to call site 2 public function redirecionar() { redirect('nomecontrollersite2/indexsite2'); } Controller Site 2 public function indexsite2() {…
-
1
votes1
answer195
viewsA: How to make a datatables data be clicked by calling another view?
Yes, does so public function processos_page() { $processo = $this->Processo_model->getAll(); $data = array(); $no = $_POST['start']; foreach ($processo as $proc) { $no++; $row = array();…
-
0
votes2
answers76
viewsA: Problems with download in Codeigniter 3
<a href="<?php echo base_url(); ?>anexos/cartao-confirmacao.pdf" download<i class='glyphicon glyphicon-arrow-down'></i>Baixar</a> Use this
-
0
votes1
answer642
viewsA: Redirect after executing codeigniter function
Echo this function Javascript can work echo "window.history.go(-1);"; It will go back to the previous page keeping the form data.
-
1
votes1
answer231
viewsA: Datatables Jquery does not render column button in Codeigniter
Replace that part of your code: $row[] = array($dados->nome, $dados->endereco); for that: $row[] = $dados->nome; $row[] = $dados->endereco; $row[] = "<a href='" . base_url() .…
-
2
votes1
answer143
viewsQ: How do I use Page in this query instead of List?
@Query(value="SELECT * FROM prot_protocolo where status = 'PENDENTE' AND departamento_id=?", nativeQuery=true) public List<Protocolo> findByProtocolosPorDepartamento(String id); The page does…
-
0
votes1
answer39
viewsQ: Error in this repeat loop. It is only taking the first value of the database
Error in this loop of repetition. It is only taking the first value of the database. You’re just doing the consultation in the first field and you’re ignoring the others. @Controller //…
-
0
votes2
answers74
viewsA: Login with Spring security com md5 + salt
http://pastebin.com/dAWn9e7e //Loginbean.java http://pastebin.com/tgyxEJeh //applicationContext.xml…
-
0
votes2
answers74
viewsA: Login with Spring security com md5 + salt
http://pastebin.com/tgyxEJeh //applicationContext.xml http://pastebin.com/yhqmpQdN //Usuariosistema.java…
-
0
votes2
answers74
viewsQ: Login with Spring security com md5 + salt
Login with Spring security The following problem I have to get the login data from a database already ready with the following md5 + salt encryption…