Questions tagged as 'php'

2
answers

get the number of rows of a sql server base to show in php

I want to see the number of rows in a table in SQL server my sentence is: $result12 = sqlsrv_num_rows($conn, "SELECT asistencia FROM asistencia"); but you are not giving me any results when trying to show it in php, taking 100 results in m...
asked by 30.07.2018 / 16:06
1
answer

Attempt to assign property

Friends, you could guide me with this problem that I have, I am receiving an array, but when I want to update the data to my base it throws me the following error:    Attempt to assign property 'stock' of non-object My code is as follows:...
asked by 02.08.2018 / 16:32
2
answers

Preserve 000 in a sum

I have the following code where I get the MAX of a code, but this code is a String . To this MAX I separate it in two to get the first 3 initials that are letters and in the numbers to add 1 to the numbers. $query = "S...
asked by 30.07.2018 / 15:18
2
answers

Retrieve data from a form

Maybe what I'm asking is something very obvious, but as I'm learning I prefer to consult. When I have a form with all the complete data and send me an error message, the input fields bring back the written data to not write it again, but in the...
asked by 20.06.2018 / 15:48
1
answer

How to remove the edges in the bootstrap modal header

Good day, I'm working with laravel and bootstrap, right now I'm more focused on the design, the problem is that when creating the modal I see two white lines as if it were a margin, is there any way to remove them? Code <div cla...
asked by 20.06.2018 / 17:57
1
answer

My SQL Query gives a wrong result

I'm trying this: $email=$conn->real_escape_string($_POST['email']); $pwd=$conn->real_escape_string($_POST['password']); $cons='SELECT * FROM Usuarios WHERE email=? AND password=?'; $stmt = $conn->prepare($cons); if($stmt){ $stmt-...
asked by 19.06.2018 / 22:46
1
answer

Mysqli - multiple help consultation

I need to consult the following id where the following is fulfilled: Values entered by the user from 1 to 5 (people per room), and I have to obtain the id's of the hotels where it is true that there is a place, for example; ROOM-1 : 2 PAS...
asked by 18.09.2018 / 12:35
2
answers

Difference of exact hours between Date A and Date B

$qry = "select CONVERT(VARCHAR(20),fechaSalida,108) AS fechaSalida, CONVERT(VARCHAR(20),fechaEntrada,108) AS fechaEntrada, CAST(DATEDIFF(minute, fechaEntrada, fechaSalida)/60.0 as decimal (18,2)...
asked by 18.09.2018 / 20:34
1
answer

How to travel with PDO

I'm trying to login and I'm using PDO. This is my code Form <form method="POST" action="ajax.php?mode=login" class="form-signin"> <h1 class="h3 mb-3 font-weight-normal">Iniciar Sesión</h1> <label...
asked by 07.07.2018 / 14:16
1
answer

export excel with php and sql server

Hi, I would like to export php excel with sql server: The error that is coming to me is this: sqlsrv_query () expects parameter 1 to be resource, string given in sqlsrv_fetch_array () expects parameter 1 to be resource, boolean given in...
asked by 30.06.2018 / 14:48