Questions tagged as 'php'

3
answers

Group SQL query results by a field

I have a table like this: | ID | id_foreign | cosa | ------------------------------- | 1 | 1 | cosa1 | | 2 | 1 | cosa2 | | 3 | 2 | cosa1 | | 4 | 3 | cosa1 | | 5 | 4 | c...
asked by 10.02.2017 / 11:44
2
answers

Initialize an array of associative arrays in PHP

I know that to declare an array is done in the following way: public $hijo = array(); // ó public $hijo[]; and for an associative array: public $hijo = array ( 'idPregunta' => '', 'codigo' => '', 'pregunta' => '' );...
asked by 20.02.2017 / 20:53
2
answers

How can I detect '#!' in a url?

I would like to be able to use these symbols #!data in my urls and get the text after the symbols to send it by PHP and do a search. I would like to implement this method with .htaccess and I would like to know how to do it. Thanks in adv...
asked by 18.02.2017 / 22:52
1
answer

Autocomplete phpstorm for Codeigniter

I have the need for phpstorm to recognize methods of classes that I have previously stored in an array. I have searched in various forums and I can not find a solution to this situation that becomes tedious when the number of classes grows consi...
asked by 07.02.2017 / 20:53
1
answer

Show MYSQL results in Horizontal

I have the database of DATA created in this format. the code you use for the query is the following: only that the class table increases The column Bimester to demilitar the query. <table class="table table-bordered table-striped t...
asked by 18.02.2017 / 17:09
1
answer

use while or foreach for array management?

I would like to know what are the advantages and disadvantages, such as the situations to use the while and the foreach working with fixes I have worked with both but I do not know how they differ, if I have noticed is that when you get the v...
asked by 05.02.2017 / 17:55
2
answers

how to display various data in a label of charts.js?

in a label I want to put the dates that bring me what I received php ... the problem is that it only shows me a date and does not cover all the dates in label .. CODE $.ajax({ type: 'POST', url: 'api/grafic...
asked by 20.02.2017 / 00:34
1
answer

limited and dependent selections between two checkbox groups

I would like to know how to condition the selection of elements in the checkbox group, if in another group some element was selected I have two checkboxes: a first checkbox called comida_fuerte : Fish Chicken Meat And anot...
asked by 07.02.2017 / 14:02
1
answer

Validate number of fields and have records csv file

I want to validate: 1) That the CSV file has the number of fields that are required (in my case 6). 2) That the CSV file has at least one record to work with. I do not need to validate that the file exists. The following code shows the numbe...
asked by 07.02.2017 / 02:05
2
answers

Problem bindValue and NULL values

I have a function like the following: function xxx( $sql, $params ) { $query = $this->con->prepare( $sql ); $num = count( $params ); $pos = 0; for ( $i=1; $i <= $num; $i++ ) { $param = $params[ $pos ];...
asked by 03.04.2017 / 08:43