Questions tagged as 'php7'

1
answer

Assign results from a WHILE to a Variable

guys, I have the following case: I have the following code: $sql ="SELECT * FROM monto LIMIT $limite_base, $l "; $resultadosql = mysqli_query($db, $sql); while ($rowsql=mysqli_fetch_row($resultadosql)){ printf ("%s\nBsS\n", $rowsql[1]); $...
asked by 28.10.2018 / 08:56
1
answer

Problems when creating a project in Laravel

When I try to create a project in Laravel, with PHP 7.0 I have the following errors: ricky@pc:/var/www/html/proyectos$ laravel new 001 Crafting application... Loading composer repositories with package information Installing dependencies (inc...
asked by 21.04.2017 / 07:27
1
answer

Error running the composer: JIT compilation failed: no more memory in phar:

When I run composer, I receive the following error:    Fatal error: Uncaught ErrorException: preg_match_all (): JIT   compilation failed: no more memory in phar:     
asked by 12.12.2018 / 16:23
1
answer

Error with undefined PHP Variable in a site where it is undefined

guys I own a PHP project where I have a file with the functions that must be executed, in this same file I have declaration of the global variables one of these variables is: $usua = $_SESSION['user']['username']; This variable...
asked by 30.11.2018 / 02:45
1
answer

Help with If statement during data entry in MySQL in PHP

I need help with the following sentence $sql = "INSERT INTO tarjetas (id, monto, codigo, serial, usuario, id_pedido) VALUES(null, '$monto', ' $codigo', '$serial', '$user', '$id_pedido')"; $resultado_ingreso = mysqli_query($db, $sql)...
asked by 06.11.2018 / 16:43
1
answer

Help separating values and assigning them to a variable using MySQL and PHP

Greetings I have the following case: I own this table: id monto afiliacion 1 10 BASICO 2 20 AVANZADO 3 30 PREMIUN My query is this: $plan = "SELECT monto, afiliacion FROM monto_mensualid...
asked by 17.11.2018 / 03:18
1
answer

How to validate a sql_query before performing the query? MySQL and PHP

We assume that I have a query: $sql = "SELECT * FROM tabla"; And I would like to validate its format before making an opening to the server, that is: validar($sql) What should return true because it is correct. But if the que...
asked by 16.11.2018 / 05:48
0
answers

In what way could I page with vuejs, axios and pure php?

public function paginarClasificados($pagina) { #Inicializamos el tamaño de la pagina $tamaño_pagina = 5; #Iniciamos en donde iniciara la pagina $pagina = 1; $empezar_desde = ($pagina - 1) * $tamaño_pagina; #Inicializamos e...
asked by 01.12.2018 / 16:54
0
answers

Uncaught Error: Call to a member function fetch_assoc ()

Hello I have a problem with a conditional if when I put as a condition if ($pagina > $total_paginas || $pagina <= 0) { header('Location:index.php?pagina=1'); } the number of rows are 7 of mysql stored in $ total_pages and the var...
asked by 06.11.2018 / 17:11
1
answer

php driver does not work after updating xamp

I have updated XAMP to the latest version, which comes with php 7.2. I have added the drivers to xamp / php / ext /: php_pdo_sqlsrv_72_nts.dll php_pdo_sqlsrv_72_nts.dll php_sqlsrv_72_ts.dll php_sqlsrv_72_ts.dll I have also configured the...
asked by 12.05.2018 / 21:59