Questions tagged as 'mysqli'

2
answers

Make php lists in a table

I have the following requirement I need to associate all the data of common expenses of the month with each user, besides that if you have not common expenses these are individual associate in a td to that user, and in the end it shows how much...
asked by 30.11.2018 / 00:45
1
answer

Help with If statement during data entry in MySQL in PHP

I need help with the following sentence $sql = "INSERT INTO tarjetas (id, monto, codigo, serial, usuario, id_pedido) VALUES(null, '$monto', ' $codigo', '$serial', '$user', '$id_pedido')"; $resultado_ingreso = mysqli_query($db, $sql)...
asked by 06.11.2018 / 16:43
1
answer

Help separating values and assigning them to a variable using MySQL and PHP

Greetings I have the following case: I own this table: id monto afiliacion 1 10 BASICO 2 20 AVANZADO 3 30 PREMIUN My query is this: $plan = "SELECT monto, afiliacion FROM monto_mensualid...
asked by 17.11.2018 / 03:18
1
answer

There is some way to put this MySqli query together

$pro1="Tubo Estructural"; $pro2= "Protector De Corriente"; $sql= "SELECT producto, SUM(cantidad) as monto FROM grafica WHERE producto = '$pro1' "; $query= mysqli_query($conexion,$sql); $sql1= "SELECT producto, SUM(cantidad) as mo...
asked by 11.10.2018 / 16:09
1
answer

WebService PHP MySQL make two queries

I have this WebService in php and MySQL and the intention is to do the $ query2 (which is an update) and then execute the $ query that is a SELECT. As I see in phpMyAdmin you are running the UPDATE, but the client is not receiving the SELECT....
asked by 02.10.2018 / 13:04
1
answer

Any way for a user to modify the $ _SESSION []?

I want to know if my web application runs some risk , since I am making all the "permission" verifications depend on the value of its $_SESSION[]; In my case, I use: $_SESSION['username'] , which contains the username of the p...
asked by 31.10.2018 / 22:38
1
answer

Add in a Mysqli a value different from that indicated by the select

guys I have the following conflict: I have the following code line in a form: <div class="form-group"> <label for="monto">Seleccione Monto</label> <select class="custom-select" id="monto_mensualidad" name="monto_mensual...
asked by 10.09.2018 / 20:11
1
answer

Change the data I receive by POST from a modal

I'm with the edition of the orders through modal and AJAX. The problem is that in the order table the "Product" field is a number, but in the modal I get the name of the product, eg: Diode Laser "thanks to a query that you make to get the nam...
asked by 12.09.2018 / 08:11
1
answer

Warning: mysqli_fetch_array () expects at most 2 parameters, 3 given

Does anyone know how I can do so that the mysqli_fetch_array can read me 3 parameters ? $registros = 1; //registros por página $sql = "SELECT * FROM base1"; $result = mysqli_query($conec, $sql); $reg_total = @mysqli_num_rows($result); //tota...
asked by 05.08.2018 / 01:13
2
answers

Can you EMPTY a table (truncate) every X Minutes?

I have a little doubt, in which I have not found much information. Could something be done, for each "5 minutes" (for example) to empty all the contents of a table? The truth is that I have been investigating, and I have not found any usef...
asked by 04.09.2018 / 22:26