Questions tagged as 'php'

1
answer

Error creating a table by _token

I have a User table and an Entry table, which is for a user to buy an entry to visit a botanical garden. Ticket data: Schema::create('entradas', function (Blueprint $table){ $table->increments('id'); $table->da...
asked by 18.02.2018 / 16:18
3
answers

Why can not the JSON database value be decoded in PHP?

I use the following function to insert a JSON string in my database: $a_value = 1; $b_value = 0; $c_value = 1; $feature = array("A" => $a_value, "B" => $b_value, "C" => $c_value,...
asked by 19.02.2018 / 14:48
2
answers

How to delete an Id and restructure the database

I have the following problem and I do not know if there is a function in php to do this or in what way I can fix it. I have a database in which I will search for records that match a search criteria, when I receive it I will have something...
asked by 19.02.2018 / 06:42
1
answer

Query get Records between an initial and a final hour

I am trying to make a query to validate if a specific appointment already exists, since in the same period of time no other appointment should be generated. For this I consult the date of the appointment, the initial hour of the appointment and...
asked by 16.03.2018 / 04:21
1
answer

I have these values and still do not let me do the insert

$sql = "INSERT INTO usuario ("; $sql .= "CUM, Nombre, A_Pat, A_Mat, Sexo, F_Naci, Vigencia, Provincia, Grupo_S, Seccion, Scouter_Responsable,"; $sql .= "Tel_Cel, Password, Estatura, Peso, Color_Cabello, Color_Ojos, Color_Piel,...
asked by 14.11.2018 / 02:37
1
answer

PHP How to get the name of a variable file?

I am trying to import an excel book in PHP but the name of this file is changed every day. $nombreArchivo="/Carpeta/archivovariable.xlsx" Is there any code to add in the path such as "%%" or "*" so that the file is imported without importin...
asked by 30.01.2018 / 23:40
1
answer

Array only prints last record

I have the following structure. global.php <?php define("DB_HOST","localhost"); define("DB_NAME", "prueba"); define("DB_USERNAME", "root"); define("DB_PASSWORD", ""); define("DB_ENCODE","utf8"); ?> conexion.php <?php require...
asked by 30.01.2018 / 14:32
3
answers

Problems with PHP routes

I have the following codes: I have my index.php <!DOCTYPE html> <html> <head> <?php include('includes/head.php');?> </head> <body> <?php include('includes/navbar.php');?> <?php includ...
asked by 26.01.2018 / 21:43
3
answers

mysqli and php query does not work

I want to show a certain number of "products" on the screen, I create a series of bootstrap letters to store the information there. I generate my connection (I clarify that the connection is perfect): <?php $conexion = mysqli_connect("lo...
asked by 17.04.2018 / 06:27
1
answer

PHP associative arrays

I'm trying to create an array of a mysql query and I'm going crazy. That query returns me several machines by centers. And I want to make an array with the centers that have and within each center the different machines foreach ($maquinas as $...
asked by 17.04.2018 / 09:05