Questions tagged as 'mysqli'

0
answers

How can I write a file to create and write a .txt file with the records of a table of a bd with php?

Actually I know how to write a .txt file with php but only sending data from a form, what I'm looking for is to write the file according to the records found in the table of the bd ...     
asked by 18.09.2018 / 19:45
0
answers

Prevent a foreach from doing a duplicate INSERT INTO

I have the following code: <?php function entregar_pedido(){ global $db; $id_pedido = ($_GET['id']); $user = ($_GET['user']); //$lote = $_REQUEST['lote']; $lote = "1 1111 1111 1111 1111 1111111111111111 2 2222 2222 22...
asked by 22.09.2018 / 19:51
1
answer

php-mysql insert into "table" It does not show any error, nor does it record the data in the table

PHP <?php session_start(); require("funciones.php"); $error=""; if (array_key_exists("Logout", $_GET)) { //Proviene de mi-oficina.php session_unset(); setcookie("CodUFree","",time()-60*60); $_COOK...
asked by 07.09.2018 / 15:20
0
answers

Detect error in MySQLi query from PHP, using stored procedure

I have a question, I am developing a small PHP to obtain the data of a query in a procedure stored in MySQL, the problem is that I can not find a way to detect if this query ended in error, to perform the procedure if necessary corresponding in...
asked by 11.09.2018 / 04:26
1
answer

by granting all privileges to my phpmyadmin user in cpanel does not add the INSERT privilege

granting all privileges to my phpmyadmin user in cpanel does not add the INSERT privilege, and when I want to insert privileges to a database in phpmyadmin it tells me without privileges and # 1045 - Access denied to user: 'root '@' localhost '(...
asked by 05.09.2018 / 17:10
0
answers

How to show all the contents of two tables in a select regardless of the amount or type of fields

As I could show all the contents of two tables by a single query you will see the code I have is the following <?php $query=$conexion->query("SELECT * FROM comentarios c R...
asked by 04.09.2018 / 23:55
2
answers

How to do an Update to two tables at the same time

Can an UPDATE be made to two tables at the same time? I'm doing this but obviously it does not work: <?php $id = $_POST['eIdp']; $producto = $_POST['eidPr']; $factura = $_POST['eNumero']; $eFecha = $_POST['eFecha']; $eVencimiento = $_P...
asked by 12.09.2018 / 10:23
0
answers

I can not download file by php sql

I am trying to download a file (in this case an .xls) by means of php and sqli. The file (hello.xls for giving you an example name) is "downloaded" with its correct name but it weighs 0kbs, so it does not grab the file, it just retrieves the nam...
asked by 03.09.2018 / 17:12
0
answers

Error php mysql user login

I have a problem, I have 2 forms, one registration and one income. the registry works and the login does not work. The error is due to the fact that in the registration form there are many input and in the input form only 2, and I miss several e...
asked by 10.09.2018 / 15:14
0
answers

Data view php mysqli

I have a problem showing the data in the view, I mean, I have a data modification form, which edit and update the data in the database without problems, but when I return to the view to show all the data data of the table, it does not show me an...
asked by 10.09.2018 / 04:33