Questions tagged as 'php'

1
answer

How can I make a query that I add and subtract in a table

<?php $db = mysqli_connect("localhost", "root", "", "paypal"); /* verificar la conexión */ if (mysqli_connect_errno()) { die("Conexión fallida:" . mysqli_connect_error()); } $sq = "INSERT INTO montos (usuario, monto...
asked by 05.10.2018 / 14:42
1
answer

Obtain multiple objects in PHP - JSON with Retrofit2

I'm trying to make a simple project of a gallery for android and I have a problem when it comes to getting the images from the server and showing them in my application since it only returns the first registered image and what I'm looking for is...
asked by 06.10.2018 / 07:17
1
answer

Call to a member function random on null in Laravel 5.7

I am doing a test project for my learning of Laravel in its version 5.7 I am in the part of launching a seeder for, with everything configured in the factories, the models and the DatabaseSeeder, random data are created in the database to be...
asked by 24.09.2018 / 22:18
1
answer

PHP FOR & WHILE

I create an array where it has years (2012,2013 ..) and when wanting to remove the elements from the table it does not throw anything at me this is the code that I use for($i=0;$i<count($array);$i++){ $sql = "SELECT SUM('VENTAS') VENTAS...
asked by 22.09.2018 / 19:36
1
answer

spaces to the right when passing data to input text in modal

This is my case I hope you can help me I have a table which is filled with data from mysql, each row has a button that displays a modal window which carries the data of the row on which the button was clicked. Everything works fine except tha...
asked by 04.10.2018 / 14:28
1
answer

Google Drive API with PHP - Problems updating the token

I am trying to update the token in the PHP code but it is not working. I am using the Google Drive API with PHP, the code works well in the browser until the token expires, checking in other pages I have changed the code in this way: index.p...
asked by 19.09.2018 / 15:35
2
answers

record data in different tables

I get the following question: I have three tables in my database (student (role 1), teacher (role 2), guardian (role 3)) each of them has a specific role and I have a form to register the data, I would like to know if there is a way to register...
asked by 20.09.2018 / 15:42
1
answer

Loading images in gallery (No lazyload)

I have the following code that a gallery puts together: <div class="contenedorGaleria"> <div class="m-p-g"> <div class="m-p-g__thumbs" data-google-image-layout data-max-height="350"> <?php $pCarpeta...
asked by 25.09.2018 / 12:34
1
answer

Arduino AREF flashes

I have a very simple php code with two buttons, one to turn on and another to turn off the led. A very simple arduino code, too. My problem is, using the arduino ide console the program goes well, without failures, but when it comes to con...
asked by 25.09.2018 / 15:40
2
answers

Error: Trying to get property of non-object

I have a problem accessing a specific data of an array try foreach ($data as $value) { print_r($value->mat_id); } and I get Trying to get property of non-object     
asked by 26.09.2018 / 09:50