Questions tagged as 'php'

3
answers

Layered Architecture and Class Management (no framework)

Updated I have a memory overflow problem in a layered architecture, the development has been going on for several years and they have tried to optimize some parts but the main problem lies in the Instances of the classes in the sub-layers...
asked by 19.10.2017 / 22:39
2
answers

PHP IF if two conditions are met

I want a drop-down menu only to be able to see the links to the sites to which you have permission. For this I apply a variable with the function SESSION and if it is one level or another I indicate that you can see or not see the menu....
asked by 07.07.2017 / 06:34
1
answer

Problem URL webservices Prestashop

I am trying to make use of the prestashop webservice to make a complete order. I have developed a module and I have successfully tested it in a locally installed store. I have the problem when implementing the same module in the real store. I...
asked by 19.04.2017 / 06:31
4
answers

How to reuse the same modal window, but with a different title or heading? [duplicate]

I am implementing several modal windows through Bootstrap. One for each different thing. I have done the test to load different data in the same modal window. I explain ... I have one to pick up favorite users, another for followers and...
asked by 10.04.2017 / 20:21
2
answers

MySQL AUTO INCREMENT vs. ID generated from PHP

I have tables which will have millions of records in them. What is the best way to create the unique ID of these tables? According to MySQL, there is the use of AUTO_INCREMENT, but at a certain number of registers it slows down each time....
asked by 04.04.2017 / 00:10
1
answer

how to insert date values in mysql table

I have a problem inserting dates in a table column mysql . I've already tried putting the field as varchar , date , datetime and nothing. $fecha_ant = date("Y-m-d", strtotime("-3 day")); // with this I get t...
asked by 21.11.2016 / 15:37
2
answers

Consult the database when WHERE is what I send from the Angularjs driver

I have a conection.php that connects to the DB and queryTickets.php : <?php header('Access-Control-Allow-Origin: *'); date_default_timezone_set("Chile/Continental"); **// Including database connections** require_once 'conection.ph...
asked by 03.11.2016 / 14:27
2
answers

Syntax error or access violation: 1059 Identifier name '' is too long lumen

I'm migrating to the database with a lumen, and I get the error that the primary key is too long. What I want is to put the three columns as composite keys. public function up() { if(!Schema::hasTable('asignaturas_alumno')){ Sch...
asked by 29.03.2017 / 13:13
1
answer

Store subquery in a variable (PHP)

Can I store the result of a query in a variable and use the value in another query? //consulta que quiero hacer primero $consulta_pre_has = "SELECT MAX(Prod_Pres) FROM productos"; //hago la consu...
asked by 23.03.2017 / 12:01
2
answers

AJAX, get the data returned through the POST request in PHP

I have a form with four selects, the selects send data using a POST method to a page called prices.php, once there, prices are calculated and an integer is returned indicating the price. The thing is that I would like to show the result insid...
asked by 18.12.2018 / 01:01