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
answer726
viewsHow to make a "while" of the number of rows of a query?
Does anyone know if in that PHP function - mysql_num_rows has to do with me making a while in it? I need to break the total number of rows in the table. I tried to do: $sql = "select ..."; $query =…
-
1
votes1
answer1070
viewsHow to count NULL type values in Mysql
I have a simple table with the answers, in this table I can have answers with value null, 0, 1, 2, 3, ... , only when I count the number of responses with each value these with the value null does…
-
1
votes1
answer763
viewsConvert date format to php echo
Good afternoon, My database is saving dates in the following format "2017-04-19", I do not know if it has to change the data already registered in it and the way the data will be saved, so I chose…
-
1
votes2
answers7167
viewsError trying to delete with INNER JOIN in MYSQL
DELETE FROM `tb_users` INNER JOIN `tb_marker` ON tb_users.id_users` = `tb_marker.id_users` WHERE `tb_users.id_users` = 12 Follow below the error: You have an error in your SQL syntax; check the…
-
1
votes1
answer262
viewsPython returns "Dead" when trying to read json > 240mb
The problem occurs on a Centos server version 6.8 final. The same script with another smaller file works perfectly. Test performed in Ubuntu 16.04 the process occurs successfully. Any solution?…
-
1
votes2
answers44
viewsMake top 10 by checking 3 tables
I have 3 tables: sponsors id | id_patrocinador | id_usuario quotas id | id_user | quantidade users id | nome | login What I need to do is a TOP 10 where I list 10 users who have more sponsored with…
-
1
votes0
answers725
viewsError writing to database - Moodle installation
I’m trying to install the moodle on my server Digital Ocean I am following all the steps according to what is asked, until there comes a time that asks to install the plugins, but during the…
-
1
votes1
answer62
viewsLeft Join repeat tables
I’m trying to assemble a select that has the result below: With select below I can show the null in just one column. How could I make it work for 20? I have from item_1 to item_20 and the…
-
1
votes2
answers515
viewsAbout Date in Mysql
I’m doing a program for a college job, with a database connection. On a table, I have a column NASCIMENTO of the kind DATE. On the show I have a MaskedTextBox to enter the date of birth, but I put…
-
1
votes2
answers136
viewsPage does not receive and does not register data in Mysql
I’m mounting a php application for user registration, but for some reason when I input the data and click register, it reloads the page does not give any error, and does not load anything in the…
-
1
votes1
answer40
viewsIs there any way to do multiple mysql queries and if any fail to undo all?
I wonder if mysql has a similar feature. I need to create an application and it is necessary to ensure that all sub queries return success.
-
1
votes1
answer84
viewsReceiving database search with SQL Reader
Facebook is a class where I store user information, but I don’t know how I use the ExecuteReader to get the information. Can anyone help me with this? (I’m new to the language c#) public Usuario…
-
1
votes1
answer36
viewsDoubt Query Mysql
I have a little doubt and difficulty in trying to solve my problem, I have the following query: SELECT `PcldCliente`.`id`, `PcldCliente`.`nome`, `PcldCliente`.`agencia_id`, `PcldMain`.`id`,…
-
1
votes1
answer5358
viewsHow to select a date in the dd/mm/yyyy format in mysql?
Good morning/late/evening I need to select a field TYPE DATE in mysql, the data is in the format yyyy-mm-dd, I need you to come back dd/mm/yyyy. Is there any way to do this in select? I’ve seen…
-
1
votes1
answer528
viewsHow to make an SQL (Mysql) query with medium and multiple INNER tables?
I have an instruction SQL with 5 tables. Note that I make even a calculation of radius. I need to add a new table of evaluations with: cod_evaluation int(11) cod_client cod_supplier general decimal…
-
1
votes2
answers3740
viewshow can I use group by next to order by
how to use the GROUP BY along with the ORDER BY? need to order my tabela so ASC but I can’t use GROUP BY how should I use the two together? code snippet: mysqli_query($conn, "SELECT nome_fotos, img,…
-
1
votes0
answers337
viewsDelimiter in mysql Procedure
I’m running a procedure, but my web application formats it and runs it on mysql. The problem is that when the Procedure is executed, it is in only one line (no line breaks). For example: DELIMITER…
mysqlasked 8 years, 8 months ago AnselmoGóis 11 -
1
votes1
answer83
viewsMysql case - display a certain amount
I’m having a big doubt in a sql: The website is divided into 3 categories, each category is highlighted, only that the customer has requested that wants to limit the amount of product highlighted by…
mysqlasked 8 years, 8 months ago Maurício Krüger 1,848 -
1
votes0
answers50
viewsOn Duplicate key Mysql - Ultimo id auto incremet
How do I return the last auto id increment in this case? insert into t1(a, b, c) select d, e, f from t2 on duplicate key update b = e, c = f; I’ve tried last_insert_id(), but it returns the last id…
-
1
votes0
answers69
viewsHow to enter data from a form in the database
hello I created the code below and when I run it inserts a record in the database, but it does not insert the informed data in the form. I wonder if someone could help me? on the screen displays the…
-
1
votes1
answer118
viewsInsert into does not return
I have the following table: Query with Insert public function CadastrarArquivos($pdo, $arq_nome, $a_areaid, $u_userid){ $ins = $pdo->prepare("INSERT INTO arq_arquivos(arq_nome, a_area_a_areaid,…
-
1
votes1
answer1039
viewsSQL query with SUM, displaying the return in rows
So class I have a question that is consuming my insides. Someone would be happy to tell me how to return a total of records from a query, via SUM (SQL Server) function, displaying the total number…
-
1
votes1
answer281
viewsI can’t save in the bank and does not show error log in Hibernate project
In the project I use hibernate, and when I try to save a new client, it just shows the class validation message CadastroClienteService. The strange thing is that all fields are filled in the form,…
-
1
votes0
answers73
viewsHow to query mysql using ignore index with group_concat?
I have a query that does the inner join of heavy tables with the filter where coluna = 'valor da coluna', runs until reasonable but would need to run this query without the filter. Only the query…
-
1
votes1
answer56
viewsProblems in PHP
Hey, you guys, come on! I’m new with PHP and Mysql Database. For several days I’ve been breaking my head with a code and I can’t find the error at all. :/ I have an index.php page, with a form…
-
1
votes1
answer645
viewsPHP does not save form data in the database
I’m starting in PHP and I’m having problems with the following code <?php define("SERVIDOR", "localhost"); define("USUARIO", "root"); define("SENHA", "leonardo"); define("BANCODEDADOS",…
-
1
votes2
answers140
viewsTwo fields of a table associated with One field of another table
Hello, I’m developing a system that in it I have a table called teams , and another table is called posts. Tabela equipes id, nome, foto Tabela posts id, titulo, id_time_1, id_time_2 What I really…
-
1
votes1
answer8718
viewsReturn only the last record inserted in the Mysql database
Hello guys I’m with a project but I have to make a query and return the "last line" or last record inserted in the database.
-
1
votes1
answer310
viewsJava Desktop with Mysql Database
I’m trying to write an image in the Mysql database, the table is just below, the code to load the image is soon after, I’m using a button to click on a Jlabel, after that, I use another button to…
-
1
votes2
answers499
viewsSelect record that has a date field using only the year on Where
How can I make a SELECT in the database in which the records have a field that the format is DATE Ex:(2017-05-15) and in the WHERE clause I want for just the year. I also wanted to know if it is…
mysqlasked 7 years, 6 months ago Junior Topanotti 38 -
1
votes2
answers264
viewsHow to concatenate columns from different tables?
Hello I’m with this code and I’m trying to make an adaptation to use it, but I’m having trouble bringing the contents of the column edit quant_img table, but I’m not sure how. Friends could shed…
-
1
votes0
answers58
viewsDate Filtered Crystal Reports Export (C# Mysql)
I have a Crystal Report object that is bringing the records of a View from a Mysql database. I need these records to be exported to a CSV file and I got this with the following code: private void…
-
1
votes2
answers151
viewsCount function - Mysql
I have the following tables: times - time_id INT - time_nome VARCHAR rodadas - rod_id INT - rod_rodada INT - rod_pontos DECIMAL (10,2) - rod_fk_time INT I need to add the score and group by team.…
-
1
votes3
answers236
viewsReceive json mysql data
Hello, I have the following function to read mysql BD data. Here I call -> $clientes = DBRead('clientes', null, 'nome, telefone1'); Here I display -> echo $nam = json_encode($clientes);…
-
1
votes1
answer145
viewsError Data Report Group Footer VB6
Opa! I need to add an extra field in a vb6 data report as in the image Connection to the database is done via ODBC Driver 5.1 with Mysql database. Use this SQL for report generation: SELECT *,…
-
1
votes1
answer309
viewsSearch system with mysql related tables
As you can see in the image below, I have the table Real Estate (mysql) which relates to the tables Type, Neighborhood and City. What I need is this: Has a text field to perform a simple search and…
-
1
votes1
answer918
viewsMysql query - Take the next value greater than 0
Example, I need the query to return me these circulated values. The previous result was 0 (zero). The current one is not. I need to take the current one. And list…
-
1
votes1
answer95
viewserror in importing table into database
I am trying to import a table but this presenting this error. -- -- Table structure tb_colaboradores CREATE TABLE tb_colaboradores ( id_colaborador int(11) NOT NULL, nome varchar(40) NOT NULL,…
-
1
votes3
answers367
viewsMYSQL relationship between tables
I’m not very good with database relationship and am starting my studies. I wonder why developers shorten when calling tables or if this is the mandatory? SELECT p.*, c.`nome` AS categoria, u.`nome`…
mysqlasked 7 years, 6 months ago Rafael Rotiroti 493 -
1
votes2
answers799
viewsDirect image upload to BD Mysql using C#
I am creating a WEB application using C# and a Mysql BD. I need to upload an image to the bank and then retrieve it. I’m a beginner in this world, but what I have so far: I have a field fupCPF which…
-
1
votes0
answers886
viewsMulti-file upload in PHP
I’m a beginner in PHP and I’m developing a real estate system. The problem that occurred to me was the following: I need to upload 20 photos of a property using only 1 input and save the name of the…
-
1
votes1
answer2025
viewsPick up records with date greater than the current - Laravel 5.1
I need to list the schedules that have date greater or equal to the current date, I am doing the way below but does not work, it does not return any record.…
-
1
votes3
answers925
viewsSearch name by first and last name
I’m having a hard time designing a query Mysql to search for a name, and the person can type the first and last name and accept to have another name between them. For example: Search: 'JOSÉ NUNES'…
-
1
votes1
answer44
viewsHow do I add a value to my database?
I need that if the value is null, it adds the variable getid() to the database. string comando = "SELECT COUNT(*) FROM usuarios WHERE username=@Usuario AND senha=@Senha AND tipo=1"; var connection =…
-
1
votes1
answer794
viewsMysql auto timestamp insertion
I am using the option ON UPDATE CURRRENT_TIMESTAMP, but the format that is updated in the table comes in this format: "2017-06-07 13:05:02", I wish it were in seconds like this: 1496851485, the most…
-
1
votes1
answer275
viewsDoubt question and answer systems with $_GET method
I have a system that shows a question and the person replies, When the staff responds step I use the $_GET method to pick up his answer and insert the information in the bank,plus the failure and…
-
1
votes2
answers745
viewsHow to format php date, to display 'Today at 00:00' and 'Yesterday at 00:00'?
I have a record in the TIMESTAMP database and wanted to display for example: If the date is current, show: 'Today at 00:00' If it’s yesterday’s date in the bank, display 'Yesterday at 00:00' And if…
-
1
votes4
answers1903
viewsHow to join two lines in SELECT?
I’m having a problem joining 2 lines. I did a lot of research, but I couldn’t find anything that could solve my case. In the query below, there are two SELECT, which return two lines for each…
-
1
votes2
answers40
viewsPull the information last information you will use for comparison
I have a question in SQL, what I want is the code to pull the last information of this column and compare with a label of my site, but I do not know if the Last Insert Id is better or correct to…
-
1
votes1
answer416
viewshow to insert a variable that brings an array into the database?
I have a page that has a textarea and in this textarea the user will put a list of records and in these records I separate the strings with the function explodes this is my html index.php code Mtms…