Questions tagged as 'php'

1
answer

Sum of the hours between two dates

I would like to know how I could get the hours between date_ini and end_date EQUIPO TIPO_MANTE FECHA_INI FECHA_FIN Horas TOTAL LAPTOP A 12/20/18 12/21/18 24 50 DESKTOP A 12/20/18 12/21...
asked by 24.12.2018 / 17:07
2
answers

Add php and SQL server

Hi, I'm working php with sql server and I need some help with the following: I have this query $sql = "select saldo_final from cuentas where doc = '1098788811'"; $consulta = sqlsrv_query($conn, $sql); while($datos = sqlsrv_fetch_array($co...
asked by 26.07.2018 / 22:02
2
answers

Is it possible to maintain the text format of a textarea by inserting it into MySQL and recovering it?

I'm making a website that has a news section. The page will have an administrative sector in which people (with almost no knowledge of computers) will write news. The idea is that the news is formatted (by format I mean the line breaks). H...
asked by 04.11.2016 / 00:16
5
answers

How to refresh a datatable and not the entire window?

I am developing a project with bootstrap, php pdo and mysql, I have a datatable that reads from mysql, I have a button that says "New Revenue", it already makes the entry but I want to refresh or update the datatable so that it loads the new dat...
asked by 02.10.2016 / 00:42
1
answer

mysqli_fetch_object () expects parameter 1

I have a problem with my php code that sends me the following error    "Warning: mysqli_fetch_object () expects parameter 1 to be   mysqli_result, boolean ", This is my php code where I get an error. <?php include("connecti...
asked by 25.08.2016 / 14:49
4
answers

ajax requests in Laravel

This is the example code of a controller and the normal handling (not AJAX) of a Request or request. <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Routing\Controller; class UserController extends Contro...
asked by 01.12.2015 / 18:58
4
answers

How to hide items from specific users through php sessions?

good day, I am working with sessions in php and I have two difententes users in my db, what I would like to implement is that the user2 the li elements (page1 and page 2) of my menu will be hidden, while user 1 could see all the lists (page1 pag...
asked by 03.05.2016 / 02:36
2
answers

Error in showing error message when everything returns zero?

I have an error in wanting to add an error message when there are no votes for any product. When there are no votes in a product, all the variables in the query return the print value of 0 , apparently taking the value 0 as a val...
asked by 17.10.2017 / 03:22
1
answer

Run php script and send arguments from node.js

I have a PHP script that receives 3 arguments to insert into a database php app.php "Arg1" "Arg2" "Arg3" When I run it from console I can do it without any problem, to call it from my node.js script I try with: var exec = require("child_p...
asked by 02.10.2018 / 00:01
1
answer

Print_r () with line break by Array element

I've been looking at some question of this style but I have not seen anything that serves me, so I put my question to you. I have an object called $detalle that has an array with other arrays inside (excuse me, but I do not remember th...
asked by 17.04.2018 / 10:40