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
-
3
votes3
answers2423
viewsCalculation of growth percentage
I have three columns that would be month, recipe and expenses. For example: Mês | Receita | Despesas Janeiro | 2500 | 1000 Fevereiro | 1000 | 500 I would like to demonstrate the percentage of growth…
-
3
votes2
answers1288
viewsHow to store checkbox status
I’m developing an application to make a school call list, I created the Listview and populated it with data from a database Mysql, using Json. The problem is this, I need to store the status of…
-
3
votes3
answers853
viewsMYSQL How to order this date field
I have a date field with all separate date and need to put in order as I do.. follows example that this not working... $query = mysql_query("SELECT * FROM `mensagens` ORDER BY `ano`,`mes`,`dia`…
-
3
votes2
answers6430
viewsIncrease number of rows returned by select group in Mysql
I have a table with 1 million lines that I need to do a report that groups the repeated names. I am doing so SELECT instituicao, count(*) from base_wos GROUP BY instituicao;. However always the…
-
3
votes2
answers19115
viewsMysql Workbench Import and Export
I have a Mysql Workbench Database with the data filled and I want to pass this data all filled to another Mysql Workbench, but on another computer. Is it possible to do that or I’ll have to fill out…
-
3
votes1
answer432
viewsHow to recognize Mysql instances using Java and allow the user to choose the database?
I am developing a project that is requested that it is possible to access different benches of MySQL which are allocated on machines and also on servers. In a way that allows the selection of a…
-
3
votes1
answer446
viewsIs it possible to update LONGBLOB field?
I have a script that uploads images to a table with field LONGBLOB, upload any image and display it smoothly. My question is, although I know we shouldn’t insert images into mysql, there is a way to…
-
3
votes3
answers4519
viewsHow to display part of a text stored in a TEXT column?
My table has a field TEXT where I insert text with paragraphs that are read through the function nl2br of PHP. I print each column of the table through mysql_fetch_array and everything is displayed…
-
3
votes2
answers385
viewsInnodb and Myisam generating Table already exists error
I am reformulating some screens of my system that, entirely, uses Myisam as Mysql Engine. In this case, these screens will use Innodb after reformulation. Excludes, by Phpmyadmin, all tables Myisam…
-
3
votes1
answer10006
viewsSort the latest registrations according to the registration date
Sort the latest ads registered in mysql, with the dates closest to the current date using PHP Field type (date) in mysql is (date) This is my query: SELECT * FROM frame_anuncio WHERE ativo = 'Sim'…
-
3
votes2
answers6065
viewsHow to add 3 columns of different tables
I am developing a financial system. Today we have the following situation: Banks (id, name, outstanding); Recipes (id, geraParcela, qtyParcelas) Receitas_installments (id, id_recipe, value,…
-
3
votes1
answer534
viewsIndex for MYSQL - ORDER BY influence when creating an index?
I have the following query: SELECT type,name,points FROM clients WHERE type='1' ORDER BY name I created an index for the "clients" table only above the "type field". Adding an ORDER BY on top of a…
-
3
votes3
answers9315
viewsSum results values in mysql
I am servicing a bank and am finding it difficult to make a select. Table structure descontos_taxas: id | value | client | data_created My Scenario: This table holds both rates and discounts in the…
-
3
votes1
answer475
views"Linked Server" with Mysql
DBMS: SQL SERVER 2014 + Mysql 5.5 What are the syntax of SELECT, INSERT and UPDATE instead of using the "OPENQUERY" function, when connecting through the SQL SERVER Linked Server, connecting in…
-
3
votes1
answer4451
viewsDo not repeat data when making a SELECT in Mysql
What I want is this. I’m working on a system, which registers an employee and days that he worked on during the month. So far so good, but it happens that in some cases, the employee gets 2 or more…
-
3
votes1
answer257
viewsAffiliate script with team help (Problem with recursion)
I am writing a code in Codeigniter, for the dissemination of a free and non-profit Storage cloud software. However, to work, we will have an affiliate system, which assigns a certain amount of…
-
3
votes2
answers2553
viewsHow to get database information without updating the page
I have a system where he picks up information from the database. And this database is getting data directly, so I wanted to know how I took this data and show it on the page, but without this page…
-
3
votes1
answer1477
viewsHow to import Firebird data to mysql?
How to import data from Firebird for Mysql using the PHP?
-
3
votes2
answers6944
viewsHow to calculate the time difference in Mysql?
How to calculate, the difference of hours in the Mysql?
mysqlasked 10 years, 5 months ago Flaviano Silva 1,131 -
3
votes1
answer93
viewsConvert string to array
Guys I get data from my database that comes this way 1,2,3,4,5 And I need to run each number, because each number is a user ID and I want it to show each one separately without comma or anything,?…
-
3
votes2
answers2877
viewsHow to apply password_hash for SELECT, INSERT and UPDATE?
I know the password_hash works like this: string password_hash ( string $password , integer $algo [, array $options ] ) 1 - But I wonder how I can apply password_hash in such cases: $check =…
-
3
votes2
answers5466
viewsHow to duplicate the records of a table in the BD
Well I have a BD with some records. And I would like that amount of records to duplicate. I don’t want to double loop to show the double amount, I would literally duplicate all the records in the…
-
3
votes4
answers425
viewsQuery BD and show all results except the first
I have the table tbl_galeria, what happens is that I want to make a consultation, but the consultation cannot show the first result. That is, the query will return all values except the one with the…
-
3
votes1
answer600
viewsBest way to store images in database
I have an android application that uses a mysql database, to store my users' profile information, but I would like to know the best way to store each user’s photos, because I thought to upload the…
-
3
votes1
answer3379
viewsCheckbox with data from one table, write to another
I have a form with a checkbox paying for table data manpower and I need to record in detail, but all I can do is take and record the id of manpower but also need the price and not recording, follow…
-
3
votes5
answers4257
viewsRow size Too large (> 8126)
Gave me an error while loading mysql data. Row size Too large (> 8126). Changing some Columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In Current Row format,…
-
3
votes2
answers1680
viewsHow to make rounding every 5 tenths (0.5)?
I have a select that returns the average of the columns. I used Round to remove a few decimal places and round the numbers. The possible numbers of the fields are integers from 1 to 5, and when…
-
3
votes1
answer3217
viewsHow to prevent a simple query from traversing the entire Mysql database
I have an application in Rails that uses a Mysql database with a table with millions of rows. Sometimes it happens that some part of my application does a very heavy query, locking all the rest of…
-
3
votes1
answer2592
viewsSave formatted text in Mysql DB
I am developing a news system and need to save formatted text, with line break, images between a paragraph and another and bold/italic etc. It’s all working php posting, display and everything.…
-
3
votes2
answers1038
viewsJava Timestamp and Mysql Timestamp
Problem: I’m storing a timestamp in MYSQL, but when I reset this timestamp I’m losing the thousandths. Java timestamp with thousandths. MYSQL timestamp without thousandths. Why does this occur? How…
-
3
votes2
answers5179
viewsReturn all data from the first to the last day of the month with mysql
I am searching a table in my database that needs to return all the data that was created in the current month (I will run a cron on the last day of the month at 23:00). I have in my table a field…
mysqlasked 10 years, 3 months ago Marcelo Diniz 3,356 -
3
votes1
answer1301
viewsMysql Local Database and Online Server Connection
I’m developing an application using Java Swing + Mysql database, but I’m analyzing making an online platform that talks to the local application, using the database to interconnect the data, because…
-
3
votes1
answer3066
viewsUI for PHP report design
I’ve used Crystal Reports a lot to visually create my reports based on database queries. It was very easy to group repeated information in the query. I have been looking for software or PHP…
-
3
votes1
answer1857
viewsHow to compare Date to Mysql field
I’m a beginner in Java and I have a table in Mysql that has a date field and the dates are stored in the format yyyy-mm-dd. Now I need to recover only records whose value of the date field is…
-
3
votes2
answers3708
viewsHow to normalize this database?
I’m having a problem creating a database where a company can have up to 16 workers. Where each worker can have this data: $sqlupdate3 = "Update tb_detalhe_trabalhador SET…
mysqlasked 10 years, 5 months ago ChrisAdler 1 -
3
votes1
answer929
viewsStoring array in database without serializing
I’m building a social networking website where the user can belong to groups and comment on posts. I’m trying to store group members and comments cleanly in the database, preferably without…
-
3
votes1
answer427
viewsHow to request on the server using the COMET method?
I have a system, in which it displays database files, in list form. I query the database every 5 seconds using the method Polling. How do I use the method Comet? Since this method does not keep…
-
3
votes1
answer80
viewsUTF-8: reading and inserting into Mysql via Ruby 1.8
I am using a script written in Ruby that parses some XML files and inserts the information in a Mysql group. It works perfectly well, but it’s giving me a headache now that my XML files have…
-
3
votes1
answer157
viewsDatabase query refactoring with multiples FIND_IN_SET()
I have the following query to find related topics by a set of ID’s that are not the topic to be viewed: SELECT press.image, press_i18n.title, press_i18n.slug FROM press INNER JOIN press_i18n ON (…
-
3
votes2
answers1461
viewslist of a php survey
I have a questionnaire and need to pass a list with the question and the answer value, created a question table and a response table in my database, but I’m not able to pass the answer value in this…
-
3
votes2
answers8689
viewsWhen to use address table in database
I’m developing a system where several entities will have address. Example: the school has address, the student has address, the teacher has address, the suppliers have address and etc. I’m willing…
-
3
votes1
answer41
viewsHow to set up a field using three others?
I have the following fields in the database: | id| estados | cidades | categoria | todosjuntos | | 1 | mg | sao paul| informati | mg/saopaulo/informati | The first four are populated, but I would…
-
3
votes4
answers15410
viewsMysql Workbench 6.1 CE no longer starts
I don’t know if anyone uses here, I tried to use for the first time, downloaded, installed and used the first time in a good, I found it super cool, created a database, tables, edited everything…
-
3
votes2
answers1269
viewsParameter varchar in Store Procedure
I have a mysql store as follows: CREATE PROCEDURE nome_procedure(campo VARCHAR(15)) BEGIN SELECT id as id, campo as value FROM tabela etc etc etc...; END $$ However, since the parameter I am passing…
-
3
votes1
answer476
viewsConvert column to row
This is the select of my table, the query I am using follows in the image below: It brings the normal result, but wanted it to bring this way: | Id_unica | Pixel | Inch | Quantity | 18 1080p 15 2 Is…
-
3
votes1
answer4248
viewsHow to create a daily event in Mysql 5.6?
I need Mysql to remove all data from a table always at midnight.
-
3
votes3
answers329
viewsHow to pass Id next to pagination ex: index? pag=pagina&ID?
I am making a site and on this site, I have a simple pagination site in index.php with the following code: <?php function getGet( $key ){ return isset( $_GET[ $key ] ) ? $_GET[ $key ] : null; }…
-
3
votes3
answers1579
viewsSelect the two highest values of a tuple
I have an appointment that displays the following result: ID | v1 | v2 | v3 | 54384 | 2.4 | 8 | 2.55 | 54385 | 5.6 | 1 | 3.24 | How to do, in a SELECT, the selection of only the two largest values…
-
3
votes1
answer112
viewsUpdating data in SQL
I have a table with the following fields: Nome(VARCHAR), Email(VARCHAR), Credito(INT) I wanted to know how, or with what command, I do to decrease or enlarge the field Credito. I know you have to…
-
3
votes3
answers1773
viewsHow to bypass an accent in mysql + Php
I have in my database words with accents and when I want to call I use this SQL below. But if a word in the database has accent I need to also use the word accented in my search, otherwise nothing…