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
-
2
votes1
answer344
viewsPick up only the days of the current month
I have the query below where it is made on the current day, how could make the same query in the current month until today, example: 01/09 to 13/09, but so that tomorrow’s consultation is: 01/09 to…
-
2
votes1
answer108
viewsRemove a Foreign key from a production server?
I have a table cad_address with the registration of the address of my users. I also have another order table mov_order that has a key Foreign address_id to the address table, responsible for the…
-
2
votes1
answer853
viewsViewing current month birthday in Fullcalendar
I have a database with a date in the field start, would like to display only the current month’s birthday fullcalendar, but I’m having two difficulties: select only the current month birthday show…
-
2
votes1
answer550
viewsWildfly 11 does not recognize Mysql driver when deploying
I set up my Java Web project to use JTA when performing transactions with the Database. My project has 4 Maven modules, one is unique to model classes and the persistence layer. When I compile in…
-
2
votes1
answer531
viewsMultidimensional array from mysql query
Good afternoon, I have a system, with the following tables : pagina: id,nome ,icone, idGrupo. paginaGrupo: id,nome,icone, idGrupoUser. I’m setting up a dynamic menu on top of these tables. I take…
-
2
votes2
answers123
viewsHow to make the parent relation between two select elements?
I am making two elements Select a "Area" and another "Problem" and I need to relate to each other, in the BD table of the problem FK spr_sar_codigo referring to sar_codigo of the table Area. I am…
-
2
votes2
answers179
viewsMysql Count in substrings in the columns of a varchar field
I have the following example table: ID_USER | FRUTAS ----------------------------- 1 | Laranja;Banana;Maçã 2 | Abacaxi;Laranja;Uva 3 | Pera;Laranja;Banana;Melão It would be possible to perform a…
-
2
votes0
answers1319
views -
2
votes1
answer75
views"Error: Can not Issue data Manipulation statements with executeQuery()" no Select
Doing the method to select all data from a table, but is returning me error. console: Open bank. java.sql.SQLException: No value specified for parameter 1 No value specified for parameter 1 at…
-
2
votes2
answers609
viewsHow to use WHERE function in column created from a formula?
I wrote that code: SELECT produtos.id AS id, nome_produto AS Nome, SUM(estoque.Estoque_produto) AS Estoque, Periodicidade AS Periodicidade, produtos.estoquemax_produto AS 'Média de venda mensal',…
mysqlasked 8 years, 2 months ago Roberto Gomes 455 -
2
votes1
answer55
viewsHow to send variable value into php class?
I have been perfecting the techniques of safe use with database connection and arrived at the script below. <?php class query_sql { protected static $conect; private function __construct() {…
-
2
votes1
answer95
viewsInsertion of record with webservice returns error but inserts in the database
Hello, I have a javascript function that makes an ajax call to a php file that must insert the records in the Mysql database. Well, I am able to enter the records but the function is returning me an…
-
2
votes2
answers64
viewsPHP variable problem with pelicas
I’m bringing this mysql database variable for a text input, but the result I’m not showing because of the pelicas. $cota = '946.9"1968/1975" AMA Ant'; echo '<input type="text" value="'.$cota.'"…
-
2
votes1
answer1739
viewsCommand update to remove accents from recorded data?
Is there any update command to remove accents from the names saved in the tables, e.g.: update paciente set 'Ã' = 'A' of course the column name is not that, just an example.…
mysqlasked 6 years, 9 months ago Italo Rodrigo 4,344 -
2
votes2
answers274
viewsHow to normalize this small database?
I’m trying to improve this small I TCC database of the technician, it’s very small, it’s from a small page to a trade, in which I would have a catalog of products and promotions to attract buyers to…
-
2
votes3
answers4951
viewsJson PHP and Mysql
I am working in a personal project with an open database, and I need a JSON file from a MYSQL query, I am a few days trying to solve this problem and I am very difficult, because I can not get the…
-
2
votes1
answer255
viewsAdd the same column by different criteria?
I’m trying to create a report using ReportViewer that makes a SUM in the same column for different criteria. My query works well in Phpmyadmin but in Querybuilder of Reportviewer does not work and…
-
2
votes1
answer2041
viewsHEROKU connect to mysql database
I’m doing reverse engineering on a system, and what I want is to use the same database as the old system. But I am not able to connect the system database in production with this base. And because…
-
2
votes2
answers176
viewsGenerate autoincrement serial number sequence
I want to generate a service order number, I have the code, but I want it to consult in the database the last number of the service order that was generated. Follows the code: def…
-
2
votes1
answer94
viewsProblems in Mysql query
I’m having difficulty in performing a query between 4 tables, being them. States > Municipalities > Deaths > Population The query is returning the value of the population with a larger…
-
2
votes0
answers385
viewsmove_uploaded_file does not move files
I have a form (in php, I wanted to ask if it works without problem? ) to insert images (the path of them) and when I enter the notification appears that were inserted in the database but the image…
-
2
votes2
answers9612
viewsSelect that takes the last 30 days from the current date
Good morning guys, this is a part of query which I used to search the last days from the current date. It works as expected when I put -20, but by putting -30, nay. WHERE viacao_os.creation_date…
-
2
votes1
answer136
viewsSearch the Mysql MVC database
I have a Search which searches by name, but wanted it to search both by name and by place in the same research field. Follow the action: [HttpPost] public ActionResult Search(FormCollection fc,…
-
2
votes0
answers106
viewsHow to make a Trigger Delete with validations
I have the following problem, I want after I delete a location from the leases table I go in the movies table and make the situation column as available, but in case I have the movie code in the…
-
2
votes1
answer51
viewsHow to select and play values in the same column
Example: select 'a' as 'letras', 'b' as 'letras' I want to play the letter 'a' and the letter 'b' in the column 'letters', but with this code it returns 2 columns with the same name, but I want to…
-
2
votes1
answer501
viewsHow to list multiple columns using Inner Join and left Join?
How can I get data from two tables? Example. the fields `assunto,nomeremetente,cpfremetente,observacao` da tabela **protocolos** and the datacriacao table protocolo_documents is of the…
-
2
votes3
answers104
viewsPHP variable title
Good afternoon, I’m trying to leave each page with a different title based on the id. I have to say that I am very beginner in the area and probably not a big deal, my code is like this: <?php…
-
2
votes2
answers47
viewsHow to update a database without the action from the customer?
I am not very advanced in php, sql and everything, and I came up with the following doubt. Assuming today is the 10th and I want to pass the 12th a BD information is updated to 'sent' for example,…
-
2
votes1
answer290
viewsMYSQL to POSTGRESQL via SED
I am looking for a way to migrate my backup from a Mysql database to Postgresql. The simplest way I found was using sed upon backup, but it hasn’t worked. It was like this: 1 - performing a backup 2…
-
2
votes2
answers73
viewsResult of an online MYSQL search, not column
Good morning. I have a table that lists a number of motifs each time they happen. I am using a select to group these reasons and result in the 5 most recurring ones. This is my code: SELECT count(*)…
-
2
votes2
answers465
viewsUPDATE in Mysql based on the last date of a column
I am trying to update a table in Mysql (Client table status field) based on the last date that this client was visited (Schedule table gendering field), passing as parameter the number of days that…
-
2
votes2
answers106
viewsPercentage of vote in php within a while
I need to take the votes of the candidates that are in mysql and generate the percentage of votes that each one had. How can I view the result since it is inside a while? $sql = mysql_query("SELECT…
-
2
votes1
answer73
viewsStandard phpmyadmin string search sql
I need to get the same result of a search in a table that returns me the same string portion and disregards the graphical accentuation of the search.…
-
2
votes1
answer1092
viewsMysql - Separating line values into multiple lines
I need to separate the values of a line into several lines, taking into account that it has line that has up to 2000 values separated by ,…
-
2
votes1
answer55
viewsSQL in DB Mysql
I have the following situation, a register with 5 fields being them: Type1, Type2, Type3, Type4 and value The 4 type fields are combos fields, where you can select the all option, or any other…
-
2
votes1
answer1245
viewsHow to handle Null records? In the database or app? (java & Mysql)
I am integrating a legacy database (Mysql) with a new module (Java - this problem object is a bean) that I am developing. I have a method that makes a select and returns some results that eventually…
-
2
votes0
answers30
viewsRedundancy with codeigniter + mysql
I’m having a doubt, let’s start in a system the question of database redundancy, but as the codeigniter will know that there is another base if the main one is inactive? There is something of its…
-
2
votes1
answer88
viewsDo Not Insert PHP and MYSQL Equal Values
I have a PHP and Mysql script that searches the client table for all clients that have not yet been imported to another database/table and imports. In the customer table, there’s a flag imported…
-
2
votes1
answer741
viewsHow to capture mysql (Duplicate entry) error and display a message on the screen to the user using codeigniter?
How to capture mysql error (Duplicate entry) and display a message on the screen to the user using codeigniter? Error Number: 1062 Duplicate entry '123456' for key 'process' INSERT INTO processo…
-
2
votes1
answer791
viewsFunction to allow only one vote per piece of equipment
I set up a simple polling system in which it is possible to vote only once per IP. However, it records the network IP and not the user’s computer, making it impossible for other equipment on the…
-
2
votes2
answers556
viewsInsert foreign keys
I have two tables and when I try to use a key of the 1st table in the 2nd the value appears NULL and should appear the values that appear in Aquario CREATE TABLE Aquario( ANome varchar(64) PRIMARY…
-
2
votes1
answer132
viewsWhat are the best practices for putting mongoDB into production?
I am studying Ode.js, and in most courses the staff uses mongoDB, I really enjoyed working with it, very simple and practical, but I have some questions: Nowadays, most hostels already support…
-
2
votes0
answers22
viewsI changed a value in the database and I have no backups
Good I have unintentionally altered a value in the database that is important and I have no backups. Is there anything I can do to recover?
mysqlasked 6 years, 6 months ago Samuel Rodrigues 29 -
2
votes2
answers876
viewsQuery SQL to select student and student name
I have this simple relational model, and I need a query that selects the student and the student’s name.…
-
2
votes1
answer30
viewsQuery to catch a student’s mistakes and successes
I would like a query to catch mistakes and hits from a particular student of the following table below:…
-
2
votes1
answer1113
viewsHow to Insert into the table if the record does not exist
How to insert in the table if there is no record, as for example there is the table turma_materia, has the following information: +----+-------+---------+ | ID | turma | materia |…
-
2
votes1
answer75
viewsCheck that all items are equal
I am recovering from the database all expired tickets, with the following query SELECT user,status,hash FROM ticket WHERE datepay < date_add(now(), interval -1 month) AND user = '119' The result…
-
2
votes1
answer192
viewsMYSQL - Select 2 tables
Good morning Personal! I have a problem when performing a query in MYSQL, and the query I am using is not displaying the desired results. Follow the example: TABLE: CLIENTES (codigo_cliente, nome,…
-
2
votes3
answers102
viewsTake Report with zero months
I have a query in which I take monthly deposited values it takes everything it has in the base and shows the months that were entered in the base. I would like to do different I would like to show…
-
2
votes2
answers441
viewsResizing image when inserting with php
I’m wanting that when inserting the image on the site by type="file" it resizes to 400x300, I’ve tried everything but I can’t. Image verification code to send pro BD and insert on the website:…