Questions tagged as 'php'

1
answer

Add products automatically by means of bar code scanner input

I have a problem, what I need is the following, I have an input where I would like to put the corresponding product code automatically to the table below, as shown in the image, as Could I achieve that? Assuming that it is the barcode of the pro...
asked by 16.10.2018 / 20:38
1
answer

Extract data from the database in columns of three

I need help to put the data brought from a database into an HTML table. I have this code: <div class="card-block"> <?php $sql = "SELECT idEmpresa,nombreComercial FROM empresas"; $objetoBBDD->consultarBD($sql)...
asked by 30.05.2018 / 18:59
1
answer

null values in mysql

I have a month table, an office table and another table detail_despacho, what I need is to be able to get the total of products sold for each month but with that I need that if in any month there is no registered office that still shows me the m...
asked by 26.05.2018 / 17:23
1
answer

How to get data from table roles the views through the Auth methods in laravel?

I have this relationship: In User.php: public function roles() { return $this ->belongsToMany('App\Role') ->withTimestamps(); } in Role.php public function users(){ return $this ->belongsToMany('App\User')...
asked by 26.05.2018 / 04:26
1
answer

Convert an element of an array into a string in php

I have a list of people that I bring from my bd , I want to go through that list and change each person in my list one of the attributes of the same one that is of type int as it can be the document of the person and pass that param...
asked by 24.05.2018 / 15:32
1
answer

How to solve the (Uncaught Exception: FPDF error) when trying to generate PDF with PHP

Error trying to create a PDF file with PHP and the FPDF library    Fatal error: Uncaught Exception: FPDF error: Some data has already   been output, can not send PDF file (output started at   C: \ xampp \ htdocs \ paginaoctago \ temp \ lev_6...
asked by 28.05.2018 / 19:28
1
answer

How can I perform the following query with Query Builder Laravel 5.5

I have the following query in mysql. SELECT COUNT(*) FROM (select SUM(tabla1.campo1) from 'tabla1' inner join 'tabla2' on 'tabla1'.'tabla1_id' = 'tabla2'.'tabla2_id' where 'tabla1'.'campo1' <> 0 group by LOWER(tabla1.campo2)) tabla_gen...
asked by 24.05.2018 / 16:42
2
answers

Validate if there is an id in the database, if there is an update and if there is no insertion to do it - PHP and postgresql

Good afternoon as you can see in the title, I want that at the time of entering the data to the bd of postgresql first verify that the "doc" exists, if there is an update and if there is no do an insert into , I tried and reading in forums examp...
asked by 28.05.2018 / 17:28
3
answers

Cut string from the second "/" - PHP

I have a route saved in a variable: $path = raiz/email_usuario/Imagenes/Wallpaper/../....... I need to remove $ path "raiz/email_usuario" , I can not use explode since the email can be bigger or smaller, I thought about picking up fro...
asked by 17.05.2018 / 20:45
1
answer

Concatenate variable javascript in php path

$(document).on('click','.view-info',function(){ id_ = $(this).val(); url = '<?= site_url("Venta/detail/'+id_+'") ?>', This is stressing me out, as I can concatenate the variable id_ in my route that is seen in the code. I...
asked by 22.05.2018 / 23:49