Questions tagged as 'php'

3
answers

Delete duplicate values of a variable in php

In a varibale I have the repeated values $variable= "1,2,3,4,5,6,7,8,9,1,2,3,4,8,9,1,2,3"; there is some php functionality that allows to eliminate the repeated values = I did the test with array_unique($variable); but I get a mis...
asked by 28.02.2018 / 18:06
1
answer

Compare date with Carbon in Laravel

I want to implement a logic in my laravel backend using the date of a publication. The example is as follows: A user creates an article, this contains title, content, image, user owner and date of publication, it turns out that the user pu...
asked by 21.07.2017 / 23:26
1
answer

Count number of php rows

I'm trying to count the number of rows based on a WHERE in php but when I execute it it throws me an error. Code to count public function mostrarRollosModel($tabla){ $stmt = Conexion::conectar() -> prepare("SELECT cod_p...
asked by 20.03.2018 / 22:35
1
answer

SQLSTATE error [23000] when trying to add a new item to my BD through my api

I am developing a API with slim framework 3 that connects to a local database. The problem is the following, when I try to insert a new element, it throws the following error {"error": {"text": SQLSTATE[23000]: Integrity constr...
asked by 14.02.2018 / 15:48
1
answer

How to change the width of the columns (widht) with bootstrap 4

Good morning, colleagues. I have a problem, the client wants to assign the default column width, with values that already come by default in the database. I am already obtaining the data of the values of the titles. And I already have the tab...
asked by 15.02.2018 / 16:33
1
answer

Limit of pages in PHP mPDF

Good morning. I am using the mPDF library for PHP, which I am having problems when displaying more than 33 pages, if the information grows to the point of reaching 34 or more pages, it does not show information or errors. I already tried changin...
asked by 13.02.2018 / 01:09
2
answers

Compress images with imagemagick for php

Hello community good afternoon someone around here has used the imagemagick library with php to compress images since I am using a function but I do not veil the changes when I check the weight of the images, that code is what is in an example o...
asked by 12.02.2018 / 22:25
3
answers

warning: mysqli_query expects parameter

Hi, try to declare these parameters but it seems to cause me an error, originally they were all mysql and I changed them to mysqli. Could you tell me where I'm wrong? LINES OF THE CODES THAT CAUSE THE ERROR $sql2=mysqli_query("SELECT...
asked by 15.02.2018 / 22:32
1
answer

Error Object of class mysqli_result could not be converted to string when trying to display a value of a query in a php table

I am developing an inventory system where I have to show in a table the products with their respective stock and at the end the total stock of the whole warehouse. I have the following code to show that total $suma = mysqli_query($mysqli, "...
asked by 16.02.2018 / 21:26
1
answer

Problem with bindParam: "ORA-01745: invalid host / bind variable name"

I am trying to insert a user and his password into my Oracle database. When I insert a basic name and password, all right. But when I try to insert a user, with a password hasheada, I do not get an error, but it does not do anything to me either...
asked by 13.02.2018 / 11:08