Questions tagged as 'mysqli'

1
answer

(!) Warning: mysqli_fetch_array () expects parameter 1 to be mysqli_result, boolean given in C: \ wamp \ www \ final p4 \ deletion_table.php on line 20

hello I have a problem I want to select in a data case a column by measure of a form and the selected one print it introducir el código aquí<html><head> <link rel="stylesheet" href="CSS/principal.css" type="text/css"> </he...
asked by 04.11.2018 / 17:34
0
answers

Mysqli query, Group and show results

I need to show results grouped by price (from, to) Values of my DB: articulo | fecha | precio pelota |2018-11-10 | 10 pelota |2018-11-11 | 10 pelota |2018-11-12 | 11 pelota |2018-11-13 | 11 pelota |2018-11-14 | 11...
asked by 04.11.2018 / 12:30
1
answer

Fatal error: Call to a member function query () on null when making a query

I'm trying to do a project with php and mysql in MVC. but I get this error when I want to ask a question. The code of the connection and the query is the following: <?php class dbNBA{ private $host="localhost";...
asked by 24.10.2018 / 05:19
1
answer

Add all the fields of several records corresponding to a MySQL column

How can I add all the fields that correspond to a column in a table? Example: | ID | Cantidad | ------------------ | 1 | 200 | | 2 | 150 | | 3 | 60 | How can I add up all the "Quantity" fields? That is, (200 + 150...
asked by 31.10.2018 / 17:19
1
answer

Validate a DNI - NIF in PHP

Continuing with the registration of clients, I have to validate if the DNI or NIF exists, and I would like to know if it can be verified if the DNI or NIF is correct. I would also like the fact that in the input I put a mask with the fields that...
asked by 07.09.2018 / 12:06
2
answers

Update a record in a Mysql table from a POST variable?

I am trying to update a record in a MySQL table, by means of a script called " prueba_envio_1.php " which selects the value of the first row of the table with heading waiting when you press the call next button, when you get this information...
asked by 03.10.2018 / 19:41
1
answer

Detect that a record to be deleted does not exist in the SQL table (MySQL)

Thanks for helping me a lot. I have a simple doubt. I made a form that deletes records from a table, it works correctly, but I can not get an error message saying that the record does not exist, it simply says that I delete it (When that reco...
asked by 04.10.2018 / 16:15
2
answers

Print consecutive rows of the same column mysqli

I tried printing two consecutive rows of the same column with MySQLi, but I only print the same value. $result = $link->query("SELECT id_papers, name, pen FROM Papers, Pens WHERE id_papers = id_pen_papers"); // la consulta no es exactamente...
asked by 04.09.2018 / 14:50
0
answers

List checkbox from database using php and ajax

I need to show a checkbox listing from a database with ajax. I have an example that lists a select with data from the database but I can not find a way to modify it to show the checkbox . The form: <form role="form" id="agre...
asked by 31.08.2018 / 05:37
2
answers

Problems showing related data in Codeigniter

It turns out that I have a problem I want to show the name of tables related to inner join in Codeigniter but it does not let me not know what I'm doing wrong. Controller public function consulta() { $asociados = array("tablaAsoci...
asked by 03.08.2018 / 05:21