Questions tagged as 'php'

1
answer

show query result

I need to show a query in a database in a table of two columns in html. I've done it that way, but it does not work out: <table border=1> <tr> <th>Nombre</th> <th>Poblacion</th> </...
asked by 24.12.2018 / 17:31
1
answer

two consecutive selections

I need to do this exercise in a single file and only with php. I have two combobox with two buttons, one behind each combo. The first combo loads well from a mysql table. When the first button is clicked, the second combo is loaded with a query...
asked by 23.12.2018 / 16:38
1
answer

Execute lumen migration using docker

I have a'docker-compose.yml' file where I have: MYSQL and php separated in containers. I enter the container with php, to execute the command'php artisan migrate', in the first instance it tells me that the pdo_mysql driver is missing, that I...
asked by 25.12.2018 / 07:07
1
answer

create temporary tables mariadb 10.1.21 from php 5 and be able to make a selection of them?

I am trying to create a temporary table from php but when doing the select it tells me that: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given in The code is as follows: mysqli_query($db,"DROP TABLE IF EXISTS T");...
asked by 04.01.2019 / 20:42
2
answers

Laravel: Consultation with Eloquent using count

I want to make a query that involves a count, and it works. The query is this: $user = Auth::user(); $id = $user->id; $users = DB::table('cuentas as a') ->join('pasajeros as b', 'b.id', '=', 'a.pasajero_id') ->where('b...
asked by 10.07.2016 / 01:51
1
answer

display data from a selectbox on sql server

As my question says, I need to know how to show data when selecting an option of a selectbox. My code is as follows and I use SQL SERVER (it's worth saying, since most tutorials are for mysql) <?php define('DB_SERVER','x.x.x.x'); define(...
asked by 28.12.2018 / 01:31
2
answers

Excel Horizontal

How can I do it so that, from the moment the Excel is downloaded and I open it, the orientation of the page is horizontal? I tried to put this from the beginning of the code, but it does not work. $objPHPExcel->getActiveSheet()->getPa...
asked by 27.12.2018 / 17:52
1
answer

Use htaccess to make the most friendly urls

Previously I used my url in the following way http://www.nombredelaweb.com/rubro.php?id=juguetes-magicos I get the value of the variable like this: $variable = trim($_GET["id"]); Now I update and in the htaccess file add the following...
asked by 18.12.2018 / 19:31
1
answer

Delete duplicate php array [duplicate]

I have an array like this: Array ( [0] => Array ( [iataCity] => NRT [nameCity] => Tokyo ) [1] => Array ( [iataCity] => MIA [nameCity] => Miami ) [2] =>...
asked by 18.12.2018 / 16:35
1
answer

How to delete a data within the same index in Laravel

I work in Laravel 5.7, I have a Model Locations, a controller LocationsController, and since there are so few data that this model will have (and its respective table in the database) I have decided to make their respective crud in the same inde...
asked by 17.12.2018 / 22:24