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
answers35
viewsMultiple querys with php
hello everyone would like to know how to run two querys at the same time in php the situation and the following intend to do an Insert and return the auto_increment key I am doing the following…
-
0
votes1
answer187
viewsFilter Search
I have a problem to create a search filter with select, I was very confused, I will post the code and a picture of what I need: the code: <?php session_start();…
-
0
votes1
answer30
viewsDisplay data from a table summing a specific column
good afternoon! I’m a beginner in php and I’m trying to build a table that tells the date and the sum of sales made, however, I can only present the sum of the values but I can not present the date…
-
0
votes1
answer91
viewsSQL query to return only filled table records
How do I return my query only records that are filled? My table has some blank records that are returned by the association. <?php $consulta = $pdo->query("SELECT * FROM ws_so_wind,…
-
0
votes2
answers3306
viewsFatal error: Call to a Member Function fetch_array() on Boolean when querying Function help
I am doing a function that when it receives a number , in case, an id it makes a query and rescues the name that is in that id and I come across this error. code function catporid($cat){ global…
-
0
votes1
answer24
viewsError in newer versions
I have this line on the server that uses PHP and MYSQL in previous versions than on my local machine, works perfectly on the server, but on my machine with more current versions does not work. Is…
-
0
votes2
answers480
viewsReturn primary key after insertion into Mysql
I need to insert into my database two tables, one of the tables has a primary key and the other will use this value as a foreign key. My question is: How can I return the value of this primary key…
-
0
votes1
answer1528
viewsGet the month of the mysql datetime field
Colleagues, I have a table where you have the Mysql datetime() field. I would like to take a given month directly from the Where clause. By PHP I know how to do, but how would I do directly by…
-
0
votes0
answers113
viewspaging does not load the next records
Hello, after running a search, it delivers the specified amount in the code, so far so good... now enter my problem, I’m using url friendly and even if the form send with "...? page=1" guess it does…
-
0
votes2
answers88
viewsGroup a set of measures in PHP
I’m having a problem uniting a set of values. I have a wood marking system. I feed the database with the length x width of the wood Id, id_request, length, width, date Registros: 1, 3, 320, 20,…
-
0
votes0
answers49
viewsFind a record using the value of a cookie
I can’t find a value in the database by a select using as reference a variable from a cookie: $query = "SELECT * FROM carrinho WHERE dono = '$dono'"; However, if you search using the variable text,…
-
0
votes3
answers825
views -
0
votes0
answers844
viewsRecover Data from Mysql
I uninstalled mysql, did not backup the database, but backed up the files: ibdata1, ib_logfile0 and ib_logfile1. The ibdata1 file has 17GB, in my.cnf innodb_file_per_table=0. How do I recover this…
-
0
votes1
answer288
viewsUse foreach in a table checkbox
In the code that I am creating there is a view of all the users of the site in an html table, until then everything right, however when selecting multiple checkbox to delete several users of the…
-
0
votes2
answers410
viewsHow to use sprintf to mount an SQL query?
What is the correct way to use sprintf in mysqli and make the return IF? $rs = $mysqli->query(sprintf("INSERT INTO perguntas (chave, nome, email, idade, estado_civil, profissao, religiao,…
-
0
votes1
answer206
viewsHelp with foreach error
I’m developing a system that needs up 2 types of img a small and a large for the database but when I send up 3 img small and 3 img great test my foreach does not go up all the img small or their…
-
0
votes0
answers33
viewsInsert picture along with text in the same column as blob type
It has how to insert image and text in the same column and show in the same order as for example: inserting 1-> 2->Text visualizing 1-> 2->Text…
-
0
votes1
answer800
viewsGrab the last ID when inserting into Mysql database
How to get the last ID when inserting into BD Mysql, using PHP and Mysqli. $inserir = $conexao->query("INSERT INTO cadastro (nome, sobrenome) VALUE ( 'Fulano', 'De tall' "); echo $id =…
-
0
votes1
answer42
viewsLogin page using mysqli_fetch_row
I am creating a very simple login page where the user type his name and password, the system scans the database(mysql) and validates its entry, however, when I enter the values correctly the system…
-
0
votes1
answer326
viewsPHP error when displaying search result with select
Error while selecting database data. $rs = $conexao->query("SELECT FROM cadastro WHERE ID_Cliente = '83'"); $row = $rs->fetch_assoc(); echo $row['nome']; Fatal error: Uncaught Error: Call to a…
-
0
votes1
answer132
viewsSort select by date
How to sort this select by DATE? (SELECT * FROM mensagens WHERE de = '2' && para = '1' ORDER BY data) UNION (SELECT * FROM mensagens WHERE de = '1' && para = '2' ORDER BY data)…
-
0
votes0
answers40
viewsinsert balance into db only after confirmation
I am making a system for controlling expenses/revenues, and I want to know how to make the amounts of revenue or expenditure if they add to the balance only after confirmation of payment. Ex:…
-
0
votes2
answers905
viewsInsert ID from one Table into another Table
How do I insert the ID of a table into another table? <?php $login_cookie = $_COOKIE['login']; if (!isset($login_cookie)) { header("Location: index.php"); } $con = mysqli_connect('localhost',…
-
0
votes0
answers187
viewsMysql query with grouping by day and time range
Good afternoon. I’m putting together a page with reports based on the amount of sales a bar has made. only if there is a problem. I need to generate a sales report per day until then I managed by…
-
0
votes1
answer179
viewsHow do I add id values from a total array
I take 2 results from an array, for example: 1 and 9, these numbers are ID’s that I will use for a query in the database and print these results on the screen, I can even print, but for example if…
-
0
votes2
answers336
viewsHow to update records marked with checkbox at a while
I am not being able to update the fields that are only selected by CHECKBOX, which I was able to develop right below: BD.SQL CREATE DATABASE IF NOT EXISTS `seq_acessos` DEFAULT CHARACTER SET utf8…
-
0
votes0
answers69
viewsHow to interact fields from msql tables?
I’m creating a book exchange page, I made two tables of wishes and mine. until the part of the logged-in user wish to find other’s books I was able to do, but I would also like the other users to…
-
0
votes2
answers916
viewsFunction that returns mysqli_fetch_array
My scenario is this: I have a function called searchUsuario() function buscaUsuario($conexao) { $retornar = array(); $query = mysqli_query($conexao, "SELECT user_name FROM usuarios"); while($result…
-
0
votes1
answer29
viewsArchive of Magento’s queries
Good afternoon, I would like to know where is the file that makes the querys in Magento. I use version 1.9.
-
0
votes0
answers20
viewsSave database data in array?
I have a database where saved email and file names attached by users, which can attach more than one file, and would like to show all the files that the user attached on the screen, I thought to…
-
0
votes0
answers160
views -
0
votes1
answer54
viewsProblem with jQuery.ajax php
Good, I have a problem that I have no idea what Ija. I have tried to do everything but nothing. Here’s the thing I’m doing a php chat but it’s giving Alert an error(): ERROR! jQuery(function(){…
-
0
votes1
answer1061
viewsHow to get LAST_INSERT_ID() from a mysqli_multi_query() function with SET and INSERT?
this is my 'Betting Signup Method' on my betting system. In this way, I register data in two tables, a call BET and another BET_MATCHES, the system is controlled by time, so in all entries I need to…
-
0
votes2
answers202
viewsMysql query not returning
i have a database Register two-table Joao and maria containing two columns name and age and I’m wanting to do a query in php I just don’t know if I’m doing it right because I’ve been using database…
-
0
votes2
answers33
viewsHow to locate the data of the respective month
I would like to know how to get only the data of the respective month in which we are. For example: I have the date 2017-05-10 and I have the date 2017-11-05, how do I take data only from a date…
-
0
votes3
answers1885
viewsSelect different values in two tables - SQL and PHP
I have two tables to pedido_tb and the pedido_grade, what I want to do is compare, the values of the column "request" of the requested table and column "n_pedido" of pedido_grade, basically, would…
-
0
votes1
answer37
viewsproblem when connecting to database
Warning: mysqli_select_db() expects Parameter 1 to be mysqli, string Given in C: xampp htdocs lojavirtual conecta.php on line 3 Could not connect
-
0
votes1
answer96
viewsPuzzle with array and modal
So I have a page that shows a total of 8 Divs per pagination, these Divs have little information inside, they have 2 button that allows you to delete and have more information about what is inside…
-
0
votes1
answer39
viewsDo not select records that have the status='Off' field
$query = "SELECT uf , count(*) as number FROM tab_clientes GROUP BY uf "; It is working perfectly but I have in the bank a status field that classifies the person as Off (need to continue registered…
-
0
votes0
answers35
viewsError importing records from database to chart
In my old system I had a hightcharts chart that imports the record values of my database table, however, when using the same model in another system, the following error started to appear: Notice:…
-
0
votes0
answers26
viewsWarning: mysqli_select_db() expects Exactly 2 Parameters (did not find answer in the other topics)
I’m new to this programming business so I’m kind of stuck in this code, so I’d appreciate it if someone could help me. The following warning appears: Warning: mysqli_select_db() expects Exactly 2…
-
0
votes0
answers19
viewsSearch a table or other with PHP
What I would like is this: I have two tables, being tabelaA and tabelaB. I want the term searched if not found in a table, to be consulted in the other table. I don’t know if there’s anything that…
-
0
votes0
answers46
viewsSelect record from each mysql category
How do I get the two records with the highest view of each category? I have 7 categories and would like to pick up the two items with higher views of each of these 7 categories.
-
0
votes0
answers30
views -
0
votes1
answer37
viewsError entering data into BD using mysqli
I’m trying to insert into 2 data tables, but I always have the error of Cannot add or update a child row: a foreign key constraint fails that is to say that it cannot insert in the second table,…
-
0
votes1
answer37
viewsIs it possible to display the data of a table separately?
I have a table in my database and it contains a column with the following data: link.com/1, link.com/2, link.com/3, link.com/4 What I would like to know is if there is a way I can query in PHP and…
-
0
votes0
answers65
views -
0
votes0
answers25
viewsMysqli query returns FALSE instead of returning database records
Hello, I’m trying to query the user login data in the php database but I noticed that the variable that receives the function that makes the query always returns empty and I var_dump this variable…
-
0
votes1
answer39
viewstxt file inserted in bd
good, I am making a website, where you will find a txt file that the user will upload (always in msm format(process, name, number)). I’m trying to use arrays to search the data and enter it in the…
-
0
votes1
answer104
viewsError inserting record in child table with PHP
Hello, I have the following tables: |-----tb_usuario---------------------------------------------| |id - name - login - password - flag_active - permission|…