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
-
0
votes2
answers827
viewsphp error with mysql and mysqli
I’m kind of new to programming and I’m having a hard time, I was programming a site and running it on wampserver, but from a while I updated the wamp version and the php MYSQL commands stopped…
-
0
votes1
answer109
viewsDuplicate result in Mysql in while
The table has two columns, one of user data and another of user points, the user points works like the bank statement scheme, but need to return only the last value, and I did so SELECT `usuario`.*,…
-
0
votes1
answer29
viewsQuery problems in mysql
Good afternoon. I have a query in my db that has to bring the user name data and his id of the users table and the commission table brings the commission , prize, month, and a month field consisting…
-
0
votes1
answer45
viewsCalculate the total of a table column based on the checkbox by taking only the selected ones
I have the following table: <div class="table-responsive"> <form class="form-inline" action="registrosVazios.php" method="GET"> <table id="tabelaCupons" class="table table-condensed…
-
0
votes1
answer913
viewsError: Catchable fatal error: Object of class stdClass could not be converted to string in
I am trying to make an html table equal to my database table, however, on the page that the table appears the following error: Catchable fatal error: Object of class stdClass could not be converted…
-
0
votes3
answers841
viewsMerge two database array and delete repeated values
I need urgent help, I’m doing a database query on several different array. When the information with "implode" and picked up again with "explode", however, I get repeated values and I wanted the…
-
0
votes0
answers66
viewsProblem when logging in
To create a log for my system to know that changed the information, except that the way I rode is giving Fatal error: Call to Undefined Function anti_injection() in: can someone help or give me some…
-
0
votes1
answer66
viewsError When Registering in Database
I’m getting the following error when trying to insert some data into the database: Unknown column 'F' in 'field list' In case the column and the type Enum and can receive’M', or 'F', testing…
-
0
votes0
answers46
viewsHow can I count Ikes from the relationship table
Need Select the posts along with the corresponding Ikes for each post. Cosegui select what I want, but when I use the error COUNT see in the first img. Dice The two tables also the post and the…
-
0
votes1
answer294
viewsInfinit Scroll - does not bring all BD data
I am trying to implement an Infinit scroll in my project, but I am having difficulty solving this problem the connection is perfect and I’m receiving the information from BD, but the code only shows…
-
0
votes2
answers217
viewsTake content from a list of a website and save to the PHP database
I want to enter the site below, save all html in a variable, clear html and save the content I want in the database Mysql via PHP 7. The site is:…
-
0
votes1
answer327
viewsphp, bring multiple rows from one linked table to another single id table
I’m having a hard time retrieving information. In the data for printing, I need to show in the variable $comp when she belongs to the same id_cadastro that I am consulting, so far everything well,…
-
0
votes0
answers47
viewsList and search records
Good afternoon, guys. I’d like your help if I could. I’m already racking my brain and I still can’t find the right solution. Please if anyone can help I really appreciate. 3 linked tables repestado…
-
0
votes1
answer374
viewsFill a field by selecting another field
I have an order form where the name of the customer is chosen and I would like from this selection to be filled in the discount field, this value is in the same table where the customer registration…
-
0
votes0
answers278
viewsAlternative to using UNION in mysql/php
Good morning, I am doing the sum of the elements of a column (I called Minhacoluna) in function of another, called "turn". There are three values for turn, so I need the code to return three…
-
0
votes1
answer37
viewsMysql search with only one of the selected fields
I have a question about how to organize this information, I have two selects in my code, that the user choose both it, generates the table searching who has the two information, however I would like…
-
0
votes1
answer288
viewsHelp with accents
Tó with a problem to solve problems and accents in PHP pages and need a light. To solve the field names problem I used Cód. below in my file funcoes.php and in all pages I put include…
-
0
votes2
answers92
viewsMerge query returns to be populated a combochart
I have 2 appointments in the bank: One returns the goals of the day until the last day of the month: DIA META 1 3,23 2 6,45 3 9,68 4 12,9 5 16,13 6 19,35 7 22,58 8 25,81 9 29,03 10 32,26 11 35,48 12…
-
0
votes1
answer3324
viewsCompare records between two tables in MYSQL
I need a solution to compare any changes in the table products_csv in relation to table products even if it is only the exchange of a (letter or number) in some field. I am using the code below but…
-
0
votes1
answer70
viewsMy form does not send to the bank
I created a form to save data in the database Mysql, but it’s not working as expected. I’m having trouble identifying the problem because no error appears, the page just a refresh. Table in the…
-
0
votes0
answers70
viewsMysql to MYSQLI connection (class)
Would you like to make this connection on mysqli, could someone help me? I’m having some difficulties. <?php Class mysql { public $query; public $data; public $result; public $rows; protected…
-
0
votes0
answers45
viewsInsert a Select into the Mysqli Database
<?php session_start(); include("class/bloqued.php"); include_once("conexao.php"); seguranca_user(); $btnAnunciar = filter_input(INPUT_POST, 'btnAnunciar', FILTER_SANITIZE_STRING);{ if…
-
0
votes1
answer478
viewsChange Login button to logout
First of all I want to warn you that I am a beginner in PHP and I appreciate help because I need to deliver a work and I am in Deadline I have a login button and I want you to switch to logout when…
-
0
votes1
answer158
viewsORDER BY RAND() in 2 columns
Well earlier I posted a problem about the elimination of 1 select which was solved but now I appeared another problem . My idea is to create a playlist that prioritizes status 1. Whenever a user…
-
0
votes2
answers78
viewsProblem with Login
I’m trying to create a basic login, with verification so that there are no records with even users in the database. But I’m making a mistake on this line $row = $resulta->fetch_assoc(); Fatal…
-
0
votes0
answers109
viewsProblem with mysqli_insert_id - Class
I have a problem getting the last id inserted in a table, for the same is returning empty. I searched the stack but couldn’t find a solution. Script for inclusion of information in the BD: if (…
-
0
votes1
answer245
viewsInner Join is returning repeated results
I have three tables! One of them is a relation table! Are they: Person: Treating: Relationship Table between Person and Treatment: I would like that when passing the person’s ID, the query returns…
-
0
votes4
answers72
viewsShow login user column sum. error
Good morning, everyone, help me? i do not understand much of php, but for me to finish my site missing only one thing: I need to post the sum of the values that are in the table but based on the…
-
0
votes1
answer40
viewsContent in the same line when pulling mysqli
I host a text field in my database, with my space between paragraphs. However when I pull it to insert without being in textarea field it comes all in one row only, without spacing. Goal: Bom dia…
-
0
votes2
answers2939
viewsHow to change from mysql_real_escape_string to mysqli_real_escape_string();?
I am creating a simple php login page based on in this video. However, after doing exactly as the video describes, I learned that my PHP version has updated and it is no longer possible to use the…
-
0
votes1
answer146
viewsHow to exchange content without changing the structure?
I started making a website in the code anyway. Only this site will have several pages where on every page, the structure is the same, what changes is only the content. In order not to have to do the…
-
0
votes0
answers57
viewsSecurity Login Anti Injection Mysqli
I am the following doubt, I gave a good research, but I would like to know... My administrative login system I was using only addslashes, for search reason for greater security, I added…
-
0
votes2
answers30
viewsMysql Help to Return Unavailable Days for Scheduling
I have 2 mysql tables that represent days unavailable for scheduling: Table Holidays: id, day (date), name Table special_days: id, day (date), will_work(Boolean) In the querie I need to select the…
-
0
votes0
answers37
viewsHow to edit a record and update immediately
How do I get the user to edit the value of presenca('P','F') and update in the database <table class="pauta"> <?php $consultaAluno=mysqli_query($conexao,"SELECT a.matriculaAluno,…
-
0
votes2
answers48
viewsError in form validation
What I need to do is when the email is not valid send from the javascript alert wanted to show a message above the form in question that showed the email was invalid! HTML CODE <input…
-
0
votes1
answer222
viewsERROR Parse error: syntax error, Unexpected '<'
this error appears in my code: Parse error: syntax error, Unexpected '<' in /home/Storage/3/da/ca/public_html/Viewrevisao.php on line 110 What would be the solution in this case <?php…
-
0
votes1
answer787
viewsConnection class mysqli in php and SELECT
The connection code with the database I built is working, but when I use a SELECT an error appears and I could not solve. <?php define('DB_NAME', 'projetoxyz'); define('DB_USER', 'root');…
-
0
votes0
answers145
viewsAdd multiple record at once with foreach
Good morning, how would I make this entry at once fill several tables? Mine is not working... See my code: // Atribui uma conexão PDO $conexao = conexao::getInstance(); // Recebe os dados enviados…
-
0
votes1
answer183
viewsSave more than one data in this form with PHP and Mysqli
Hi, I have a problem with this code. I’m making a form I need to save, but unfortunately in the database only saved once the rest always gives error... I would like to resolve this problem, and I…
-
0
votes1
answer45
viewsI cannot select a database using PHP
Hi guys I’m not getting a select in my PHP database. I have tried to implement several solutions, but it always returns 0 Results, and I have data in my BD. I am using external files to connect to…
-
0
votes1
answer60
viewsDisplay rest of BD mysqli data in new PHP window
Well what I’d like to do is call the database data to be displayed only the main data in a table, and in that same table having the preview button where when I press it opens a window with the rest…
-
0
votes0
answers25
viewsFatal Error Executing the Query
I’m trying to do a while but I’m not getting it at all. It’s returning the error below: Fatal error: Call to a Member Function query() on null in /home2/techlogu/public_html/index.php on line 697 My…
-
0
votes3
answers105
viewsError in Mysql query
Hello! this doubt arose in mysql query; because the status is coming different from the table? follow my consultation: SELECT DISTINCT max(idEmbreagem) as idEmbreagem, b.prefixo as idVeiculo,…
-
0
votes1
answer2104
views -
0
votes1
answer24
viewsError when executing query within function
I am having problems to do a search in mysql database inside a function in PHP, if I do the search outside the function works normally but I would like it to be done inside the function for me to…
-
0
votes1
answer201
viewsWarning: mysqli_real_escape_string() expects Exactly 2 Parameters, 1 Given
I’m making a posting system using PHP and Mysqli, but there are some errors that I’m not able to fix. Follow the PHP code below: <?php if (isset($_POST['enviar'])){ $autor =…
-
0
votes0
answers99
viewsHow to separate array by columns
Good night! I’d like to ask for your help on the following... I need to read a txt, which contains information of a client x... Only this txt is separated by lines and I n can change because it is a…
-
0
votes1
answer63
viewsMake files available according to client group using php
I need to make available on an Opencart information page 2 price table files, where one is for retail and the other for wholesale. The page that will show the link is only accessed if the customer…
-
0
votes2
answers324
viewsRecord multiple images in the database on the same line | Mysql | PHP
I’m not able to record several names of images separated by commas in a column of a row, I’m able to do multiple uploads, but each image name is recorded in a different row of the database. And I…
-
0
votes0
answers40
viewsBecause my modal is not getting the post
This is the code that receives the post <?php if (isset($_POST['idModal'])) { $result = mysqli_query($conn, $query="UPDATE tb_cartao SET mtpag=Cartão, doc='$_POST[docModal]' ,…