Questions tagged as 'php'

0
answers

Select2 PHP search does not work

Hello good day I'm using the js select2 to fill a combo, I managed to fill it but the search now does not work for any character. This is my code js $(document).ready(function(){ // $('#panel_mantenimiento').hide(); $('#reg_id').select2({...
asked by 31.03.2018 / 21:01
1
answer

Format fields with Laravel-Excel

The following code allows you to export a .CSV file using the maatwebsite / laravel-excel library from Laravel 5.2 . Excel::create('Filtro Productos Concentrado', function($excel) use($ini, $fin, $gr) { $granjas = Granja::all();...
asked by 09.04.2018 / 19:46
0
answers

Checking PHP users by name and by id

I am creating a web application in which I need to be able to register a specific type of users in which the name can be repeated but the id they have assigned does not. The table in which they are stored has the following structure: user_id int...
asked by 31.03.2018 / 19:13
1
answer

Use a factory of drivers in PHP and break dependencies for its use, despite the include or require

I have a difficult doubt to explain. Suppose I have a class in php: file: classA.php <? claseA { //mi codigo de la clase } and I have a factory that creates the instance: file: myFactory.php <? include 'claseA.php' miF...
asked by 09.04.2018 / 16:45
0
answers

Error inserting data in table, duplicate record

Greetings. I am new here, my problem is as follows. My script is making a duplicate insert to the bd after running for the first time. Example: First insertion: well, insert the record once. Second insertion (this is done after doing a .lo...
asked by 10.04.2018 / 15:42
1
answer

How to put an id to a tr from array?

How can I put the ids that come from the database to the tr from the controller since it is printed from there? //CONTROLADOR public function ajax_list() { $list = $this->Prorrateo_model->get_datatables();...
asked by 29.05.2018 / 15:13
0
answers

Error I can not find in a while loop with counter

I've been thinking about this code for a while, and I can not find the error. If someone can help me, I will be very grateful. The problem is that the meter does not auto-subsume. I tried with $ c ++ and it did not add up, so I had to change...
asked by 29.05.2018 / 14:40
1
answer

Send data with Ajax and Json

I need to work with Ajax and Json. These 2 Codes below work together and they work, it returns the id and the name. <script> function enviarDatos(){ $.ajax({ data:{ id:1, nombre:"fo...
asked by 30.03.2018 / 16:05
0
answers

yii dependent menu

I have problems to make a menu dependent, the problem I have is that it only takes the data from one menu and the other takes all the values by default. This is the function of my controller public function actionAjaxResultados(){...
asked by 26.03.2018 / 19:03
1
answer

Telegram Bot as a centOS server monitor

I'm trying to mount a bot telegram to manage my centOS server. I follow the example shown in this blog https://blog.angelinux-slack.net/2017/01/28/usar-un-bot-de-telegram-como-monitor-de-servidores-linux/ I indicate to the telegram api w...
asked by 25.03.2018 / 11:36