Questions tagged as 'mysqli'

1
answer

Insert statement does not insert anything into the DB and shows no error [closed]

I have this statement ready to insert data, although it receives and leaves it inserted, it does not insert anything in the database: Echo of the variables: echo "<br>".$unidad; echo "<br>".$cedula1; echo "<br>".$cedula...
asked by 23.03.2017 / 15:59
4
answers

Does not enter the if statement, inside the While

The following happens, I'm doing an update, when I enter an invoice from the suppliers, and when I click on a button x a function is executed (I'll place it below) it works well, the stock of the products entered is updated with the invoice of t...
asked by 08.12.2016 / 22:08
2
answers

Update with MYSQL PHP

I have this code, but it does not update, and I do not know why. <?php // if ($_POST['accemail'] == "" || $_POST['accname'] == "" || $_POST['accphone'] == ""){ // header("Location: myaccount.php"); // } else // { include ("db_files/...
asked by 28.10.2016 / 10:48
2
answers

Prevent data duplication in mysql

How can I avoid duplicating records in the database? What I try to do is first a registry query. Next I show the code.               /** * Representa el data de los gastos * almacenados en la base de datos */ require 'DatabaseConnection.php...
asked by 16.05.2016 / 18:16
1
answer

validate user attempts when logging in

I'm trying to validate an entry login to verify a user's attempts to login. If this completes 3 unsuccessful attempts, then the account is deactivated (In my database, in the user table, the user's status changes to inactive) This is my code:...
asked by 26.06.2016 / 16:30
2
answers

Send JSON php

I am having problems sending a JSON from a PHP and MySQL webService, I leave the code of the query and the fetch assoc, the query has already been checked and it is correct, in phpMyAdmin it makes me perfect, the problem is that when I receive t...
asked by 21.11.2018 / 18:33
1
answer

how to get an average in an sql query?

Could you help me solve this doubt I have. I need to show for each blood type that number of employees has it, also showing the total percentage of employees of the company represents that amount. Here the problem is that in percentage...
asked by 23.11.2018 / 00:26
1
answer

Update does not update table

Good to execute my code I can not change the value in database. Modify.php include ("conexion.php"); $usuario="jose"; $linku= $_POST["linkm"]; $db = mysqli_select_db( $conexion, $basededatos ) or die ( "Upps! Pues va a ser que no se ha...
asked by 16.10.2018 / 00:46
1
answer

Problems with fetch () fetch_array ()

I'm having problems with fetch() fetch_array() I'm working with sentences prepared since yesterday I'm new to it and I have this code that practically doing fetch() is not throwing me anything I do not know what I'm doing wr...
asked by 25.08.2018 / 20:13
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