Questions tagged as 'php'

1
answer

Install Phalcon Devtools on OSX with Mamp

I am trying to install phalcon-devtools in OSX with MAMP and Php 7.0.10 but there is no way to make it work. I downloaded the extension phalcon.so to the corresponding version of my php and the I went up in:    /Applications/MAMP/bin/php/ph...
asked by 30.09.2016 / 20:18
1
answer

Collect data in modal Bootstrap and retrieve data from PHP at the same time (AJAX, PHP, MySql)

I receive data from a link and show them in a modal Bootstrap page 1 <a href="pagina" id="id" data-target="#edit-modal">Enlace</a> page 2 $('#edit-modal').on('show.bs.modal', function(e) { var...
asked by 28.11.2016 / 14:17
1
answer

Problem with php code error array to string conversion and undefined index

when doing a sql query and traversing it gives me an error function informe_stock_critico(){ $faltante=0; $item=""; $total=0; $subtotal=0; $sql="SELECT count(CODIGO_PRODUCTO) AS subtotal,p.ID_CATEGORIA, NOMBRE_CATEGORIA from categorias c,...
asked by 27.11.2016 / 21:54
2
answers

Problem to insert data in a database from PHP

Good morning everyone! Well, my problem is the one mentioned in the title. From a form in php I'm trying to get the data I collect inserted in a bbdd, and I can not find the fault. First HTML document called "index.html": <docty...
asked by 24.11.2016 / 15:30
1
answer

Support list Array with Jquery, JSON and PHP

I'm doing a help list function that creates an array from a table to store it in a database as a string. The table contains a lot of information, in short, I can retrieve all the information with this JS code $(document).on('click','#save',...
asked by 24.11.2016 / 00:28
1
answer

How to compare elements of two arrays?

Good, my problem is that I could not compare an element between two arrays. What I'm looking for is to compare if the element in array2 is in array1 and print that element and if it is not printed it has no meaning. It is a question that if t...
asked by 24.11.2016 / 16:52
1
answer

Mysql one to many relationship (bring the information at the same time)

If I have a relationship from one to many tables there are 5 tables the main one and the other 4 tables If I have to bring the information of the 5 tables at the same time what would be the correct way to do it? what I did were 5 different st...
asked by 09.10.2016 / 01:12
2
answers

how to keep two rows of records in $ _SESSION?

I'm looking for a way to keep in $ _SESSION two or more rows of records that are thrown by a mysql query, and then use those results in other queries. I usually pulled a single record row with: while($row=mysql_fetch_array($consultar))...
asked by 05.11.2016 / 13:48
1
answer

a dynamic selection

the BD "deposits" 'id', 'cantidad', 'num_autorizacion', 'fecha', 'asesor', 'created_at', 'updated_at', 'encontrado', 'contrato_id' in the controller $depositos = Deposito::orderBy('fecha') ->whereIn('encontrado', ['no'])...
asked by 05.11.2016 / 18:12
1
answer

Go through an XML document with SimpleXML

Good! I'm trying to traverse the data of an xml document, for the time being, but when I have to deal with the attributes of some tags, it's when I get lost. $agenda = new SimpleXMLElement("prueba.xml", 0, true); foreach($agenda->personas-&...
asked by 20.09.2016 / 19:49