Most voted "mysql" questions
Mysql is a relational database management system (RDBMS) that functions as a server, and provides access to multiple users simultaneously. Your source code is available under the GNU General Public License.
Learn more…10,264 questions
Sort by count of
-
1
votes1
answer67
viewsProblem with product update
In the query the goal is to update the unit of the product, with a subquery which retrieves the current unit from the bank and subtracts by checking by code. UPDATE loja.produto SET UNIDADE =…
-
1
votes1
answer4981
viewsHow can I save checkbox in the database with php?
I have several checkbox components on the site, each with the value of a movie name, how can I save in the bank? HTML of one of them: <input type="checkbox" class="checkbox" name="filme"> Do…
-
1
votes1
answer280
viewsMysql - check occurrence in all fields
How to check the occurrence of a string in any field? Nothing specific like WHERE campo1 = "abcd", since I want to check the occurrence in any field. which is something different also from the…
-
1
votes0
answers306
viewsInsert database image
Good friends, I’m having a little problem inserting image in the database function apresenta_formulario() { if (isset($_GET['id_publicidade'])){ $ligacao = mysqli_connect("localhost", "root", "",…
-
1
votes0
answers28
viewsUse xls as data source
I have several spreadsheets with data. They have the first column as table name. 1) You can format a CSV with the first column as the table name, instead of normally using the first row as the…
-
1
votes1
answer115
viewsError sending form data
I am learning mysql and php, but is giving an error in the form, where even having been filled in it keeps asking to fill in the fields and does not record anything in the database table <?php…
-
1
votes1
answer91
viewsChoose database table for logged in user
I intend to choose only 1 table of a database, depending on the user who is logged in to the website. I want this because I’m making an account management page for website users. On this page I have…
-
1
votes0
answers54
viewsHow to make a select that brings me phone numbers
I work at a Market Place for buying and selling. I want to search phones of our sellers in different tables: Comments, Conversations and Items. How can I search only numbers, as long as there are…
-
1
votes1
answer27
viewsMYSQL - Select not working properly
Good night, I have below the search in the database, but it returns me error or does not work on line 4 where it says "JOIN contracts co ON c.email != co.email", can you do otherwise, or improve the…
mysqlasked 9 years, 2 months ago Diego Marquez 320 -
1
votes1
answer81
viewsCreate Mysql Database Table
I have the following table in CSS: I need to create the tables of the Mysql database, however, I’m not sure how to work this... It will be just "Updated" all the information in the table... What…
-
1
votes1
answer640
viewsSave input field to database
How to store the last 100 searches made to a website (PHP/MYSQL) divided by countries (e.g., store the last 100 searches for books in Macedonia). Search is a simple field: <input type="text"…
-
1
votes1
answer419
viewsReplace content according to search without having to give
Good people, I have the code word require_once 'Connection.simple.php'; $OK = true; $db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); if (isset($_GET['name'])) { $data =…
-
1
votes1
answer765
viewsHow to import data (Inserts) to a model (.MWB) in the Workbench?
In Workbench I can enter data in the model individually by table as below, then when using the forward Engineer just enable Create Inserts in the SQL file it generates, follows: But to do this for…
-
1
votes3
answers565
viewsRepeat LEFT JOIN with other parameters in the same query
I have 2 tables: FATHER: id nome SON: id idpai sexo_filho I wanted to make a SELECT that adds up the amount of children male and female, that’s the problem, I can only do with one of the sex: SELECT…
-
1
votes1
answer54
viewsCode problem
Okay, here’s the thing, I got this code: <form style="" name="form"> <input placeholder="Search..." name="name" id="fn" type="text"> <input style="display: none ! important;"…
-
1
votes1
answer2951
viewsJOIN 3 different tables display list
Good Morning Everyone. I’m trying to join 3 tables and display in a list, but I’m not getting along. I drew (WITH LESS LINES) the tables in the database and an idea of how I’m trying to list the…
-
1
votes1
answer383
viewsSearch of shops by zip code
I am developing a site with PHP and Mysql where register several stores, and each store serves a region of the city. What would be the best strategy to adopt in this case, where I have the CEP of…
-
1
votes2
answers642
viewsI cannot display my database information on the page
I created my database php, made the connection with the mysql, but does not show the data that exist in my table on Phpmyadmin, what appears is this: " . resultado['nome'] ." ". resultado['email'] .…
-
1
votes2
answers372
viewsProblem with PDO and mysql_query connection
Hello, I created the connected.php file as below: <? $conn= new PDO("mysql:host=localhost;dbname=site", "root", ""); $count = ('SELECT * FROM conteudo'); $stmt = $conn->prepare($count);…
-
1
votes3
answers358
viewshow to use date interval to count days?
how can I use the date interval to count when registering a product, for example I register the product on the 8th I want that in 15 days this product will no longer be a new product or when it is…
-
1
votes2
answers1283
viewsInner Join table with multiple identical Ids
The problem is this, I have two tables one of contracts and another of 1xN borrowers and when I do the inner join it repeats exactly the amount of columns I have in borrower but only bears the name…
-
1
votes1
answer970
viewsPHP- Display query results in a select
I input an admin to write a message to a specific user. The user will be selected by a select that fetches the names from the user table and lists them all. After selecting someone, the admin can…
-
1
votes1
answer5098
viewsSelect nested Mysql
I’m trying to get the most value out of the smallest of a table, the query I’m trying to execute is as follows: SELECT district FROM (SELECT district, MIN(postal_code) FROM address WHERE postal_code…
-
1
votes2
answers71
viewsI can’t access my database
I have the following problem, I am trying to change the year of the dates I have in my database, and for that I am using: mysqli_fetch_row But I am not succeeding, it always returns failed. I also…
-
1
votes0
answers28
viewsUbuntu 14.04 x64 Digitalocean accentuation problem
I have an accentuation problem in my Cloud Server that I am using (Ubuntu 14.04 x64), where, I try to give the following command line (in the linux prompt), using Putty, however, when I give a…
-
1
votes3
answers600
viewsCan anyone cite examples for a user’s status? (online & offline)
So I was thinking of picking up the user table where the status = online, I put by default "Offline" , but I know that when the user shuts down the computer without clicking Log out, the table will…
-
1
votes1
answer406
viewsSite is very slow
This site uploads files . torrent, downloads, opens Magnet, takes Seeds, leechers, etc, but it is VERY SLOW, it takes about 15 seconds to open. what I can do to reduce that time? if($sql =…
-
1
votes1
answer30
viewsThe Bitsnoop API is crashing WHILE
Hello, I’m using that API from Bitsnoop, but a part of it is "catching" WHILE. WHILE only runs once and nothing below it loads. Code: if($sql = mysqli_query($coneccao, "SELECT * FROM…
-
1
votes1
answer961
viewsHow to update Jtable used data from a database?
I created in Netbeans a customer registration and movie registration system (simulating a video rental company). I have 3 Java files: Video Rental (main), Client and Movie. In Client and Film, I…
-
1
votes1
answer189
viewsNumber of lines changed by the user
I have some tables in a system and for all entries I do the validation and compare if the input is equal to what is currently defined in the table and use PHP rowCount() to check if I had an update…
-
1
votes1
answer77
viewsPHP MS Sql query script for My Sql
Good afternoon. How can I make a query in MS Sql and insert the values in a My Sql table through PHP? Looking at this data, you can do this insertion? #--> conexao mysql…
-
1
votes1
answer1176
viewsHow to make select using mask on output
I have a client table, and a command field of varchar type. Cpf is stored without mask. Ex:"00751595170" I would like to do a select that format the result by putting on the masks. "007.515.951.70"…
-
1
votes2
answers88
viewsEnsure that a set of functions function correctly
Hey there, guys! I’ve got a problem eating at me and I don’t think I can handle it on my own... Here’s the thing: I have a form with a button; that button is responsible for selling a product. The…
-
1
votes1
answer72
viewsProblem with database insertion
I have in my system the following code: public int insert_dependente(Dependente dependente) { ResultSet r; int result = 0; if (!(dependente == null)) { try { Connection conn = new…
-
1
votes1
answer246
viewsWhat kind of conversion does the pre-compiler of a DBMS with the SQL language?
The compiler of a DBMS handles commands written in SQL. Assuming I’m using Mysql. What would be done with the command: select * from client; What type of conversion does the pre-compiler of a DBMS…
-
1
votes2
answers761
viewsDynamic name input name
I want to create a form with a variable number of inputs, according to the amount of data coming from a BD and assign them to the "name" unique names. Then I need to submit this form and recover the…
-
1
votes2
answers1394
viewsMysql returns only the first record
I created this function, but, it returns only the first record of the table. function pega_conteudo_pela_id($id_assunto){ global $conexao; $query3 = "SELECT * FROM `{$id_assunto}`"; $result3 =…
-
1
votes1
answer809
viewsCapture Month in field date
I have a field date in my Mysql database and it stores the date of type y-m-d which is already used in other queries, but now I need to capture only the month to perform a sum. The code I have is…
-
1
votes1
answer3188
viewsWamp does not start mysql when restarting the PC
Every time I restart the PC, my Wamp won’t open the Mysql. I have to reinstall and end up losing my banks. The wamp server opens, but the icon turns yellow. this happened after I install…
-
1
votes1
answer959
views -
1
votes0
answers41
viewsFormat JOIN result object
[PROFESSORES] id | nome | 1 | Gilson | [CURSOS] id | nome | professor_id 1 | Photoshop | 1 2 | AutoCad | 1 I would like that in the result of my SELECT, the object comes in the format: (Not…
-
1
votes1
answer1133
viewsError in connection with the database. Java + Workbench
Error in connection with bank. Can anyone help me? package conexaoprojeto; import java.sql.*; import javax.swing.JOptionPane; public class ConexaoProjeto { private final String Driver =…
-
1
votes1
answer1776
viewsImporting a very large . sql file
I have a file about 192.2 MB in size. I tried to import it through Phpmyadmin, but he complains that the file is too big. I searched the internet for a possible solution to the case, and I saw that…
-
1
votes2
answers159
viewsfetch_array does not return data
I am making a user list and the data does not appear on the page. I waited for the user’s name, his type and the number of posts and responses he sent to the system to appear. There is another…
-
1
votes2
answers229
viewsMysql Query - Count separate table fields
I need to create a view in Mysql where return the following result. Col1 | Col2 Total Tab1 | Total Tab2 I am using UNION in the form below, but the result comes as follows: col1 201 5699 CREATE VIEW…
-
1
votes1
answer663
viewsLEFT JOIN with WHERE in the field of the first table OR field of the second table
SELECT COALESCE(tb2.numero_novo, tb1.numero_original) as numero FROM tb1 LEFT JOIN tb2 ON tb2.id = tb1.id WHERE tb1.numero_original = <PARAM> OR tb2.numero_novo = <PARAM> The above query…
-
1
votes2
answers246
viewsProblem with INSERT using PDO
I have this code below that is working perfect, but I would like to change it to work in PDO but I’m having problem in the registration with BD, when I change to PDO. He refers to mistakes on line…
-
1
votes2
answers344
viewsHttppost action returning null values
I am developing a web system (intranet) to control requests in ASP.NET MVC 4 C#. Below follow my MVC where I have doubt. I am having a great difficulty with the Httppost of a Typed View, which is…
-
1
votes1
answer327
viewsSelect Distinct
tbl_protocolos id_protocolo | protocolo | assunto 1;ra001;vazamentos 2;ra002;incendios 3;ra003;inundacoes tbl_prot_tramitacoes id_tram | id_protocolo | pdf | id_setor_origem 1;1;001.pdf;70…
-
1
votes1
answer27
viewsProblems entering a datatime record
This is the description of my table in Mysql That’s how I’m inserting the records insert into pedido (data_criacao,data_entrega, entrega_cep,…