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
votes0
answers43
viewsParameter error in mysqli_query (does not accept connection parameter)
Good afternoon, everyone I’m having an error: Warning: Notice: Undefined variable: mysqli in /var/www/html/crudgenerico/classes/Conexao.class.php on line 59 Warning: mysqli_query() expects Parameter…
-
0
votes1
answer520
viewsTime difference in execution of the same query between PHP and PHPMYADMIN
I am trying to improve the performance of my pages to improve the user experience, but, I am not able to identify the problem. According to Google, it is recommended that the pages respond in less…
-
0
votes1
answer67
viewsWhere am I going wrong on this select?
I made the Select below only that it is not adding by the correct column, where I am missing? In my structure I have the field dtConcat and the field dtConcat2 (these dates are different one is for…
-
0
votes2
answers59
viewsHow not to return an "X" value in the BD?
How do I not return an "X" value in the database? For example, I have a site style Firefly, and the same has the page of each artist where is the tab "Related Artists" which is based on the TAGS…
-
0
votes1
answer39
viewsListing all categories with total number of products
I need to mount a query that displays the name of all categories, and in front of each name the total number of products. The tables are: Categorias (cat_codigo, cat_nome) Produtos (pro_codigo,…
-
0
votes1
answer151
viewsHow to list mysqli data displaying in DESC but listing from top to bottom?
I’ll try to explain it better, like this, by listing something from the bank with DESC id shows something like this: id:1 id:2 id:3 id:4 id:5 but I want it to be displayed like this: id:5 id:4 id:3…
-
0
votes0
answers259
viewsSQL query in 2 database on different (mysql) servers
Hello. First of all, I make it clear that I don’t know if this is possible. I am trying to make an SQL query where I need the union data (INNER JOIN) of 02 tables that are on different servers (One…
-
0
votes3
answers856
viewsConvert a number array to a single String in php
as I transform an array of numbers into a single string in php? In the code below the variable $result is the array of numbers, and I tried to convert it to a single string with the function…
-
0
votes1
answer504
viewsusing Mysqli within CLASS
Hello, I’m in trouble, I have some queries to do, I wanted to leave within class, I’m making the following code: <?php class MySQL { private $user; private $password; private $database; private…
-
0
votes1
answer81
viewsPHP function only works on the first call
I am calling the same php function, in which I pass as parameter a database result, twice in the script but it only works in the first call. I realized that if I call the function that returns the…
-
0
votes1
answer525
views(PHP) What variable do I put inside mysqli_affected_rows
<?php $conexao = mysqli_connect("localhost","root","","banco"); $nome = isset($_REQUEST['nome'])?$_REQUEST['nome']:""; $telefone =…
-
0
votes0
answers192
viewsHow to fix a connection error on a website?
Currently I administer the site of a Town Hall, and today, out of nowhere, the following error began to appear: Warning: mysqli_connect() [Function.mysqli-connect]: Headers and client library minor…
-
0
votes1
answer32
viewsCREATE EVENT; syntax error only inside mysqli_query()
I’m trying to execute an event command on mysql, when developing the mysql Workbench, worked normally, but when using within the php’s mysqli_query the following error is displayed: You have an…
-
0
votes1
answer105
viewsMysql Left Outer Join show only first result
I need to make this sales chart Join with the Nfe table, however the NFE table may have more than one result which causes change in total sales, how can I change this Join so that only take the last…
-
0
votes0
answers77
viewsErrors trying to update mysql script to mysqli
<?php Class mysql { public $query; public $data; public $result; public $rows; public $page = 0; public $perpage = 10; public $current = 1; public $url; public $link = ''; public $total = '';…
-
0
votes0
answers96
viewsWarning: mysqli_fetch_array() expects Parameter 1 to be mysqli_result, Boolean Given in
Good afternoon guys, I’m trying to find out why this mistake... I’m grading all the help you can give me; Warning: mysqli_fetch_array() expects Parameter 1 to be mysqli_result, Boolean Given in C:…
-
0
votes4
answers5283
viewsSort a SELECT in Mysql by a letter
How can I make a SELECT query in Mysql that sorts the results and initially displays those that start with a specific letter? Ex with the letter P: Paul Patricia (1st ones starting with the letter)…
-
0
votes1
answer32
viewsFetch integer value in BD
Good afternoon, I’m trying to query an entire value in my BD and save it in a variable, I tried this way: $procuraPreco = mysqli_query($connect, "SELECT preco FROM infs WHERE seis='$seis' and…
-
0
votes1
answer74
viewsInsert multiple records into Mysql based on an X value and add fixed values
I need to enter multiple records in the database, but without coming from a form. For example: I have a 50 value (it would be the number of records I need to enter) and a mooring id that needs to be…
-
0
votes1
answer190
viewsCRUD U cannot get the ID and edit the Update
Folks I need a light to unwind a TIMESHEET. I have the following code. <form method="post" action="includes/input.php"> <button type="submit" class="btn btn-primary"…
-
0
votes0
answers35
viewsProblem giving update in a php table with no return
I have no return on the page when I click on the input with name['edit'] even with Try catch, the page does not print anything, so I do not know what to do right, I wanted to know what I’m doing…
-
0
votes2
answers400
viewsAdd to MYSQL query in varchar field by deleting Strings
How to add directly to the query MYSQL when the field is sweep and need to delete some strings. Example: +------------+ |valor_total | +------------+ |R$ 2.277,90 | |R$ 3.217,30 | |R$ 9.857,40 |…
-
0
votes1
answer21
viewsScript does not save full word if it has accent
I have a script that works very well on my Dashboard, but I put it on another page and is not working. When a word has accent, eg: "Natalia" the system is saving in bd only "Nat" excluding the rest…
-
0
votes0
answers75
viewsSave PHP History (Modification Log)
good night! I would like to know how to create a history, a page where I can view everything that has been modified on a page, for example: I have a Corporate Phone Registration page, where everyone…
-
0
votes1
answer32
viewsTime limit for each post
I need a solution to delete a post or a record from the database in 3 days, in case the post will be available 3 days and then will be deleted. I think to use the following line: DELETE FROM posts…
-
0
votes1
answer43
viewsconsult and add BD result
I have a table (dia) receiving the data during the days: (id, dia, cliente, func, servicos, valor, produtos, valorp, fdp) (1, 2018-11-01, cliente1, func1, servicos1, 0++, produto1, 0++, D ou C) I…
-
0
votes0
answers50
viewsQuery of multiple Mysql data
I’m doing a chat and I have the following table in the bank: I want to list the last 5 conversations of a user, but the query is very complex, I’m for a while trying to solve with Queries, but I…
-
0
votes1
answer723
viewshow to update the database using checkbox
would like to know how I can do an update with checkbox, with the system I developed I can get normal all checkbox that will be changed but I can’t catch the id of the respective how can I do this?…
-
0
votes0
answers27
viewsDelete line according to date difference in Mysql
I am trying to delete lines from a table using as a reference the difference between the current date and the date the line was registered. Here is my code: DELETE FROM lixeira WHERE diferenca >…
-
0
votes0
answers38
viewsFatal error generated in PHP code msql. How to update the code to mysqli and PHP 7 and fix the error?
I’m a beginner in PHP, I’m doing a real estate project in PHP of a course I bought, and a problem appeared in the configuration part of the project’s login panel. The problem is that when I…
-
0
votes1
answer54
viewsMysql Error 1064
in the Insert below I get the following error. INSERT INTO dump1090 ('hex','squawk','flight','lat','lon','validposition','altitude','vert_rate','track','validtrack','speed','messages','seen') VALUES…
-
0
votes0
answers74
viewsUpdate with PHP and MYSQL division
How do I make a UPDATE for all users of a database? For example: UPDATE usuarios SET juros=investimento + investimento * 30 /100 WHERE id='89' The bank will take the investment data and add 30%, but…
-
0
votes0
answers234
viewsCompare values in two tables with php and Mysqli
I have to compare if the numbers in table A exist in table B and if it exists it makes one instruction or another. I tried that and it didn’t work. Note: In table B there may not be codigo table A…
-
0
votes1
answer150
viewsMysqli error - not registering in database
I am migrating from Mysql to Mysqli and have some errors in this my script that are not inserting into SQL <?php $host = 'localhost'; $user = 'root'; $pass = ''; $db = 'controleestoque'; //…
-
0
votes1
answer121
viewsUndefined index: stream
I am studying php and can not understand the reason for this error. It executes the code as it should until a certain part. Basically I’m trying to use a database where users will insert Twitch…
-
0
votes1
answer197
viewsHow to make a database query with multiple filters
I have this list of filters I can receive all her normal values in an array by get method, but I’m having doubts about how to do this search with several filters, I performed a filter for example…
-
0
votes1
answer19
viewsmysqli_num_row error
I am unable to show the column count in the database. For example I want to show in the panel how many orders are registered. For this I want the ID count. include 'conexao.php'; $pedidosq = "SELECT…
-
0
votes1
answer281
viewsStore dynamic form data
The form is created through data obtained from the Mysql database. I would like to save all the data from it by clicking on the submit. Problem: I can only keep one line at a time, creating a boot…
-
0
votes2
answers3644
viewsverify registered user PHP Mysqli
Hello, I know almost nothing about Php and mysqli. I am trying to implement the user system for the site, the registration is already working but I can register with the same email as many times as…
-
0
votes2
answers80
viewsHow do I use variables within this PHP + Mysqli code?
My code returns the following error: Parse error: syntax error, Unexpected T_VARIABLE in /home/a2015539/public_html/envio.php on line 28 The code is this: // Create connection $conn = new…
-
0
votes1
answer36
viewsChange a table in the database from a date in another table
I have a ban_logs table that contains a date and needs that after that date, an event or Trigger is enabled to change the is_banned field of the user_data table. ban_logs id, user_id, date,…
-
0
votes1
answer102
viewsCall to a Member Function mysqli_fetch_object() on a non-object
I’m creating a system of Likes and currently he was connecting with Mysql, then now I’m migrating to Mysqli, but is giving an error and I can not solve at all :( php connection. <?php $servidor =…
-
0
votes1
answer87
viewsSend e-mail with specific content of each line returned from mysql
I need to send an email warning the user that your request is expired, I go to the bank and search all records in this condition, the problem is that the body of the email has to be the content of…
-
0
votes0
answers21
viewsQuery mysqli with error
I am updating my mysql system to mysqli and I am not able to do one of the queries. I’ve tried a thousand different ways but the error remains. It should be simple but it’s not working. Someone has…
mysqliasked 5 years, 6 months ago Marcos Vinícius Rinaldi 1 -
0
votes0
answers264
viewsSQL, List number numbers that are not in the table sequence
How could I list numbers that are missing to complete the sequence of numbers given column of my table? see the link to view my test base: http://sqlfiddle.com/#! 9/d124553/1 See below my select to…
-
0
votes0
answers23
viewsPass information to the user via cookies
Ai, good wanted to know how do I pass information to the user through the cookie (when he is logged in appears profile button, if he is admin appears create product button, etc etc) thanks I…
-
0
votes1
answer51
viewsHow do I bring the same numbers from other tables?
Good morning, I’d like that help. I have a table of "INSCRIPTION" where it has 2 foreign keys (CAND_SQ and CANDPL_SQ). Both foreign keys have a CPF field. I would like to know how I bring the…
-
0
votes1
answer33
viewsMYSQL - Where with relationship does not resume result
I need to use this Where in a query, but without success With 'AND' does not work. where ((`atributos_detalhes`.`keyValue` = 'dormitorios' and `relation_imovel_detalhes`.`value` in (2)) **AND**…
-
0
votes1
answer1201
viewsInsert data into codeigniter database
Say guys all right, I’m having the following doubt: I need to view and save data in my database but as I will show below I am using Joins to display, for example the name of an author using his…
-
0
votes1
answer1076
viewsHow to search for values in a PHP file with jQuery - AJAX?
Guys I want to search a string in a PHP file called search.php I want to return a string to my index.php but I want to do this when calling the function try_it(), is there any way to do this with…