Most voted "mysqli" questions
The Mysqli extension (Mysql Improved) is a relational database driver used in the PHP programming language to provide an interface with Mysql.
Learn more…945 questions
Sort by count of
-
-2
votes1
answer55
viewsHow can I check if the image already exists in the mysql database and directory?
Hello, I’m doing crud And now it’s given me a headache in the picture stage. Basically I want to be able to register an image that has a unique name in the bank and in the directory and then if…
-
-2
votes1
answer78
viewsPHP repeating database data
Hello. I’m making a website for student purposes, taking into account that the connection to the database is perfect, when it comes to getting the data stored in the database, PHP duplicates the…
-
-2
votes1
answer138
viewsUpgrading MYSQL to MYSQLI
What can I do to fix this? I did some research, but I couldn’t understand what I’m doing wrong, my knowledge is basic in the subject. I bought an application that came old MSQL that no longer worked…
-
-2
votes1
answer35
viewsDoubt: How to insert multiple lines using $_GET and Mysqli from the same.php file to the same table
Speak cooler! I need a help. I’m creating some screens with PHP 7.4 + Mysqli + Apache, running on an Ubuntu 18.04. I have a file/script registro_serra.php, in it I capture variables to insert in the…
-
-2
votes1
answer180
viewsPull output from mysqli_query using php
I’m trying to organize a ranking with some data from my DB in Mysql. I need to collect the data displayed in Query but does not come at all. See the image of the query with the data. Where I’m…
-
-2
votes1
answer41
viewsI need to get my if
I’m doing a website search in the bank and I have the following code <?php include("conexao.php"); $pesquisar = $_POST['pesquisar']; $result_produtos = "SELECT * FROM produtos WHERE nome LIKE…
-
-2
votes1
answer44
viewsHow do I delete and edit database data?
Well, I made a registration system for a video classroom gringa (United States), so I want to be able to edit the data that this system sends to the bank from his code, that is. I want to make a…
-
-2
votes1
answer42
viewsINNER JOIN in 2 tables from 2 different databases
Good afternoon, I need to make an INNER JOIN between 2 tables where each one is in a different database, but on the same server. I have 1 table called "settings" and others called "customer…
-
-2
votes1
answer19
viewsList and count results that repeat within an array
I have the following table ID| nome | Tipo 1 | Teste, João, Maria | Indicação 2 | Teste, Maria, José | Projeto de Lei 3 | Maria, José, João, Teste | Indicação 4 | Maria, João, José | Denúncia I…
-
-2
votes1
answer36
viewslist publications of friends
i am making a query in the database to list my publications and the people I follow on my Timeline, the more the query just this bringing my publications. <?php $tipo_news = "SELECT * FROM…
-
-2
votes0
answers25
viewsTable with foreing key does not send data to Phpadmin
I’m still a beginner in mysql and php but after some studies I’m trying to create a system and in case I’m having trouble with FOREING KEY, I have two tables a 'tb_students' and 'tb_notes' but I’m…
-
-2
votes0
answers37
viewssearch image path registered in database
I am trying to display the images of products registered in the database, each product has its own image. <body> <div class="container theme-showcase" role="main"> <div…
-
-3
votes1
answer182
viewsHow to return the total value of items in a table?
I want to know how to return the total value of items, I use the mysqli to connect to the bank. Table ec_despesas have the following fields: (more details of the structure in this image) id, aba,…
-
-3
votes1
answer58
viewsScore user who accessed the site 4 days in a row
Every time the user enters the system (logs in), their data is saved in the database, including a Timestamp column. I’m at a loss to solve the following problem: if (usuario entrou 4 dias SEGUIDOS)…
-
-3
votes1
answer122
viewsInsert ID into another field of the same table at the time of INSERT
I’m in the following situation, I’ve been searching the net and found similar aids but not what I really need to know and I don’t even know if it’s possible! Come on! There would be some way for me…
-
-3
votes1
answer179
viewsCheck whether person is of legal age, if yes delete it
I need to make a query in MYSQL database to verify if a user is of age based on their date of birth compared to the current date. If yes the user should be deleted from the database.
-
-3
votes2
answers81
viewsHow to use WHERE function in column created from a query?
select a.campo1, b.campo1,replace(replace(b.campo1,'-',''),'.','') as resultado from dbo.tabela1 a, dbo.tabela2 b where a.campo1 = resultado I am trying to select above, but it displays error…
-
-3
votes1
answer41
viewsvariable pass to a select
I would like to pass the variable value $var into select, but gives the following error : Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given in…
-
-3
votes1
answer88
viewsHow do I put a background image in CSS using PHP?
I’m trying to put a background image by css using PHP, which means the image I want to put in the background is inside the database. I open the php tags inside the background URL background-image:…
-
-3
votes2
answers39
viewsHow to divide an array of 90 elements into 20 on each page, in PHP?
A query via mysqli (in PHP) returns me 90 lines in an array. How do I print a maximum of 20 lines on each page ? I developed it as follows, but it’s still too grotesque: Can someone help me perfect…
-
-3
votes1
answer107
viewsLogin system giving error!
I am trying to make a login system, I made the form so that when the button was pressed it sent to a page with the following code: <body> <?php $conexao = mysqli_connect("localhost",…
-
-3
votes1
answer49
viewsReferenced method is not found in Subject class in PHPSTORM
In my code, in PHPSTORM returns that method fetch_all was not found. <?php $conn = require 'connection.php'; $result = $conn->query('SELECT * FROM users'); $users =…
-
-3
votes3
answers107
viewsHow to create the same codes to run in php7?
Good people I am a little behind in things and so far I could not learn php7 again. Well these files(3) there that I am showing you is the way I do to show database record in a show way. I wonder if…
-
-3
votes2
answers74
views -
-3
votes1
answer295
viewsdatabase query returning empty array
Hello, I have an appointment function at the bank. If the query returns 1 or more rows, the function returns an object (or a class), but if the query does not return any rows, the return is: Array (…
-
-3
votes2
answers166
viewsHow do I check for registration in php?
$nome_cad = $_POST["nome_ent_c"]; $cpf_cad = $_POST["cpf_ent_c"]; $tel_cad = $_POST["tel_ent_c"]; $end_cad = $_POST["end_ent_c"]; $invite_cad = $_POST["cod_convite"]; $codgerado =…
-
-3
votes1
answer41
viewsMysql connects but does not display keys
Good morning my code returns this error Fatal error: Uncaught Error: Call to Undefined Function mysql_query() in /home2/minhap26/public_html/pages/lists.php:8 Stack trace: #0…
-
-3
votes1
answer58
viewsTake empty value of an array, how to do?
I’m trying to make a system that can check in the database the id, if it already exists, will edit the existing one, if it doesn’t exist, it will create a new one. The two codes work separately, but…
-
-3
votes2
answers64
viewsphp login giving user nonexistent
I created a login system with php and mysql but I can’t log in even though I’m sure the data has been registered successfully. I don’t know what I did wrong. Look at the code: <?php $login2 =…
-
-3
votes0
answers14
viewsFunctions in Mysql phpMyAdmin
I’m trying to do the following exercise 1 - Develop a Function that returns the name of the liquidator by passing as parameter the identifier of the liquidator. Then use the created Function to…
-
-4
votes2
answers2364
views -
-4
votes1
answer922
viewsWarning: mysqli_query() expects at least 2 Parameters, 1 Given in C: wamp www Trabalho odesi proceslogin.php on line 22
<?php // Busca as variaveis $login e $senha $login=$_POST['login']; $senha=$_POST['senha']; // Conecta ao servidor e selecione a database. $conn= new mysqli("localhost","root","","registro");…
-
-4
votes1
answer15542
viewsError "Warning: mysqli_query() expects Parameter 1 to be mysqli, null Given"
I am developing a PHP API, which is hosted on Hostinger. However, when I do the SQL query on Mysqli, I get the same error no matter what changes I make to the code: Warning: mysqli_query() expects…
-
-4
votes2
answers222
viewsPDO and mysqli are the only options to work with PHP database?
And if I needed to use a database that wasn’t supported by PDO, what I could do? After all, what does PDO do underneath the scenes? It uses mysqli?
-
-4
votes1
answer54
viewsReturn records from 00 am to date
I’m trying to get the recorded votes of 00:00 so far and my code shows that there is no. $query = mysqli_query($mysqli, "SELECT * FROM votos_1 WHERE DATE(date) = DATE(NOW())");…
-
-4
votes1
answer36
viewsConnection problems
When sending the form to register the email entered in the field it should simply register in the database, but it does not register, how can I solve? <?php $conect =…
-
-4
votes1
answer135
viewsproblematic mysql query
have the following data admlogin: admin1 admpassword:admin admlogin: admin2 admpassword:admin admlogin: admin3 admpassword:admin <form action="#" method="post" id="frm_login_p"…
-
-4
votes1
answer73
viewsError index, help me please
I tried everything, I don’t know why you’re making a mistake, PLEASE HELP ME THE MISTAKE IS: ( ! ) Notice: Undefined index: usuario_id in C: wamp64 www full table excluirAdminUserDoador.php on line…
-
-4
votes1
answer294
viewsReact Hook "useState" is called in Function
Good evening, I performed a CRUD project with Node, React and Mysql, but when trying to create routes in front-end, is generating the error: React Hook "useState" is called in Function "Register"…
-
-4
votes2
answers36
viewshelp already tried everything to solve my problem with mysqli
Hello everyone I’m with a problem I can not understand or solve I’m novice in php. this code it inserts the data into the normal database but of that error. Warning: mysqli_stmt::bind_param():…
-
-4
votes1
answer48
viewsPerform a PHP filter search on multiple tables
I need to do a search with filters for example SPECIALTY > CITY and then show search result follows my code: <?php if ($specialty != null && $city != null) { ?> <?php…
-
-4
votes1
answer64
viewsphp does not update registry in bd mysql
I’m trying to update the database, it returns the message that the update was made, however, when seeing in the database, the update was not made. What should happen: When clicking the save button,…
-
-4
votes1
answer21
viewsSELECT TWO COLUMNS THAT HAVE THE SAME ID IN DIFFERENT TABLES AND MAKE COMPARISONS
Good night Devs, I need to take each actor_id and film_id and check which total of movies(filme_id) has linked to actor_id and this I got : SELECT actor_id, COUNT(film_id) from film_actor group by…
-
-5
votes1
answer105
viewsMysql not creating the PHP content line
When I try to pass values to my database I don’t find them in it, I’m using php with MAMP. Follows the code: <?php error_reporting(E_ALL);ini_set('display_errors', 1); $host = "localhost:8889";…
-
-6
votes2
answers43
viewsQuery to know which books students do not have, in SQL
Good, I have the following tables Livro: ID_Livro PK Nome Aluno: ID_Aluno PK Nome RegistoLivroAluno: ID_Registo PK ID_Aluno (chave extrangeira de Aluno) ID_Livro (chave extrangeira de Livro) ) I…