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
-
0
votes1
answer63
viewsControl access to documents
I am creating an application to manage files, the files are being saved in a local directory "localhost/uploads...", I have a table "documents" with a field "urldoarquivo", where save the file path,…
-
0
votes1
answer113
viewsHow to exchange a column id for the name in the same table in Mysql?
I want to select and instead of receiving the top number I want his name which is nm_depto. How can I do this? SELECT d.id_numero_depto, d.nm_depto, d.id_numero_depto_superior FROM tb_depto AS d;…
mysqlasked 7 years, 1 month ago Alexandre Saura 3 -
0
votes1
answer165
viewsAjax sends php query in Mysql
Hello friends I’m studying Ajax I’m trying to make this code execution work, but I still can’t. I’m trying to do after formprodutos be selector is sent to consultarcor.php via Ajax the information…
-
0
votes1
answer45
viewsProblem with Dynamic Input
I am developing a dynamic input that checks whether the database contains a value if there is such value should not appear in the input, but I am experiencing problems with my logic: <?php…
-
0
votes0
answers116
viewsHow to add a value in an empty field in Mysql?
I’m spinning a query who needs to pick up the 5 first lines with limit 5. However, there are times when they will return less than 5 lines. The value comes empty, nor NULL, nor 0. I try to make a…
mysqlasked 8 years, 5 months ago Humberto Costa 21 -
0
votes1
answer148
viewsCreate database through PDO
I have a project in mind, in which I would like to create database with the name of variables, and in case it would be done a check to know if the BD has been created, would be something like this:…
-
0
votes1
answer253
viewsInsert Data Tuple into same database cell
I have the following script: import pymysql cobertura = (10, 20) base_de_dados = pymysql.connect("localhost", "root", "senha", "base_de_dados") cursor = base_de_dados.cursor()…
-
0
votes1
answer64
viewsHow to copy . php file
I have a database with the fields: name I have an a.php file that fetches the name data from mysql and fills in a certain area of the page (content). What I want is that as long as there is data in…
-
0
votes1
answer112
viewsPaginate Doubts Arable
I turned that code 1 into code 2 1)//$palpites=DB::select("SELECT * FROM palpite WHERE id_u='$id' order by id_c desc "); 2) $palpites =…
-
0
votes1
answer196
viewsHow to save images from an android Imageview to a Mysql database using a java web service Rest
I have an android application with an Imageview that receives an image from the device, and I need to save it in a mysql database through a Java web service how could do this?
-
0
votes1
answer38
viewsHow to perform query in two tables by doing data combination
I have two tables: material id | categoria | subcategoria | codigo 1 | 3 | 15 | FS-5600 2 | 0 | 16 | FA-4500 subcategory id | descricao | id_categoria | id_produto 1 | Alasca | 3 | 2 4 | Aragon | 3…
-
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
votes2
answers53
viewsINSERT times do not insert all data
I have a little problem, $alta = $_GET['alt-a']; $altb = $_GET['alt-b']; $altc = $_GET['alt-c']; $altd = $_GET['alt-d']; $correta = $_GET['correta']; $img = $_SESSION['imagem']; $questao =…
-
0
votes1
answer78
viewsText string word filtering
I need a working solution for a system I’m making. I need to block textarea field registration if it contains a few words in the string, example: This is a brief description about my profile, my…
-
0
votes3
answers86
viewsfind reference in another table
I have the following tables: register batches Where the cadastro contains the primary key id_cadastro that us lotes refers to it. However, the bank was not standardised, so the foreign key that…
-
0
votes1
answer144
viewsHow to get the largest sum on a table?
have a table id produto vendas data 1 laranja 4 16-10-2016 2 cenoura 3 16-10-2016 3 cenoura 6 17-10-2016 4 laranja 5 17-10-2016 5 laranja 1 18-10-2016 6 laranja 1 19-10-2016 the sum of oranges in 11…
-
0
votes1
answer72
viewsmysqldump: Got error: 1054
I am trying to do a Dump to do a Database Merge. Follow command: mysqldump -u root -p senha -hlocalhost --opt -t --where codemp=1 database > emp01.sql The same is returning the error mysqldump:…
-
0
votes1
answer55
viewsCreate a temporary select file to repeat on other pages
It is possible to do only a select query processing in php and mysql and use the result in pages that are sequels? Exemplo: Pagina 1 = faz select de dados, mostra o resultado e reserva. Pagina 1-1 =…
-
0
votes0
answers2795
viewsHow to format Mysql date and time for the Brazilian PHP format?
My two doubts are as follows:: 1) When I retrieve the date and time (datetime) of the bank comes in this format (for example): 2016-11-12 11:19:34 But I want to show it this way: 11:19:34 12/11/2016…
-
0
votes0
answers42
viewsAssign returned database list to a combobox
I have an HTML/PHP code where there is a list field that I would like to return the database records. However, the field or variable appears in the list display instead of the BD values. I can’t…
-
0
votes2
answers671
viewsCHANGE PHP STATUS
I’m having a problem changing the status of users of my database , when I will change the status of some user it does not approve the user of that line and yes last user what can be? php log.…
-
0
votes4
answers687
viewsAdd all values that are in the database and show on screen
They could give me a help, I have a table where I need to show the total of values, in case add all the values that this in the database and show in the table. My table calls ads and the value…
-
0
votes2
answers95
views -
0
votes1
answer87
viewsHow to put a day, month and year placeholder in Mysql?
I need to add a date column of the invoice, organized by month day and year (dd/mm/yy). How do I leave this preset time format in Mysql Workbench?
mysqlasked 7 years, 1 month ago Caio Bento 13 -
0
votes0
answers101
viewsSearch bmp image in bank and show in view.
I have a bmp image saved in the database, but this file is already in the database and was not included in the framework, I would just like to know how to show this image in the view. Note: I have…
-
0
votes1
answer297
viewspsqlodbca.so: Cannot open shared object file: File or directory not found
I cannot migrate Postegresql database to mysql due to this error: psqlodbca.so: Cannot open shared object file: File or directory not found I am using Ubuntu 64 Postgresql 9x and Workbench 6.x, how…
-
0
votes0
answers66
viewsHow to perform nested data query in JSON type column
I have the data (nested) below in a column of type JSON: [{"modSelecionado": "13"}, {"modSelecionado": "15"}, {"modSelecionado": "16"}, {"supMaxima": "5,00", "tensaoMotor": "1", "comunicacaoMotor":…
mysqlasked 7 years, 1 month ago lucasbento 856 -
0
votes1
answer87
viewsHow to display number of records by category in PHP and Mysql
I have a real estate table in Mysql divided into 6 categories. I want to make a query that returns the number of records for each category. The only way I know so far is to make a query for each…
-
0
votes1
answer77
viewsImport error of csv with fopen
I am trying to make a csv import with PHP stop insert straight into Mysql database, I am using the fopen function, which returns me the following error. Parse error: syntax error, unexpected ' '…
-
0
votes0
answers18
viewsAbout integrity in bd mysql
If I set in bd the foreign keys and activation "Cascade" according to the use of delete and update events, I need to do this at application level too?
-
0
votes0
answers67
viewsSave database from another HD
I had a main hard drive with my webserver - Apache, PHP, Mysql - but it gave problem and could not access anymore. I had to format a new hard drive and reinstall my environment. The problem is that…
mysqlasked 8 years, 4 months ago Papa Charlie 8,721 -
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|…
-
0
votes0
answers49
viewsGroup by only returns 1 result
I have a problem with my query in Mysql: SELECT * FROM `campeonatos` INNER JOIN `jogos` ON `campeonatos`.`camp_id`=`jogos`.`campeonato_id` WHERE `jogos`.`inicio` > "2017-10-30 00:00:00" ORDER BY…
-
0
votes1
answer837
viewsStarting a windows service
I am mounting a "Service Monitor". My windows server is stopping my database service. So I set up a service validator, but I don’t know how to give the start in the service again in case he falls.…
-
0
votes1
answer30
viewsFunction inside the sql server
I’m trying to make a function inside the sql server, however, I can not use it because of an error saying that the result consists of more than one line (Error Code: 1172 Result consisted of more…
-
0
votes4
answers70
viewsHow to return the sum of the business value column, month by month, based on the starting data_column?
I have the following table: I need an SQL statement that returns the sum of the business value_value column, month by month, based on the start data_column. Example: I need the name of the month and…
-
0
votes1
answer991
viewsHow to make Foreign key one-to-many in mysql?
I have a table students and a table courses, my table courses have the course for example of administration, as I relate several students to this table using Foreign key ?
-
0
votes0
answers48
viewsWhat’s wrong with that code?
all right? I am a beginner in PHP and I am "side" in a simple code, in which I have seen numerous answers here in the forum, and I did exactly as it is in the answers (until CTRL+C CTRL+V) and it…
-
0
votes1
answer483
viewsHow to create client desktop application for database access without exposing security information?
I had already made web application with access to Mysql database via PHP and know that the configuration files for access to the database are on the server side, being returned only the necessary…
-
0
votes0
answers151
viewsSeparate Mysql output in blocks in PHP
I have a table of properties divided into several categories and I want to list them on my PHP page. The detail is that I wish that in one region of the page be listed the houses, in another the…
-
0
votes1
answer52
viewsError changing table via Doctrine Migrations
Through git I used the command below: php bin/console doctrine:migrations:generate I opened the file and made the change <?php namespace Application\Migrations; use…
-
0
votes1
answer154
viewsAdd specific keys obtained in SQL query - PHP
I have an sql query that returns all the fields of a table : $registro = mysqli_query($con, "SELECT * FROM agenda ORDER BY procedimento LIMIT $limit, $nroLotes"); My doubt is, if it is possible,…
-
0
votes1
answer79
viewsHow to make a select`Multiple` start with the first option already marked PHP Mysql
Follows my component: $query_menu = mysql_query("SELECT rm_id AS FUNCAO, rm_desc AS DESCRICAO, rm_obs AS OBSERVACAO, rm_status AS STATUS FROM radios_menu WHERE rm_status='0'"); echo"<div…
-
0
votes1
answer649
viewsupdate multiple records with php mysql
I have a form that lists several records and I want to update the status field of these records but at once but I am not able to. my for and code: <form id="form1" name="form1" method="post"…
-
0
votes1
answer103
viewsInsert into field in mysql
I have a system where have registered matches and the logged user tries to hit the results of these matches, Each match has a registration id that is with the name (game) in the database, I already…
-
0
votes2
answers326
viewshow to save date with Date type in MYSQL and return to an Android app
Hello I have an Android application that takes the date of a Datepicker but I’m not able to convert it to the type accepted by MYSQL in the case Date how could do this?
-
0
votes1
answer520
viewsTime difference in execution of the same query between PHP and PHPMYADMIN
I am trying to improve the performance of my pages to improve the user experience, but, I am not able to identify the problem. According to Google, it is recommended that the pages respond in less…
-
0
votes0
answers49
viewsprogramming in Ruby on Rails
I have a form and include a table médicos, and this table has a field enum where you can choose the option of cooperativa, but I have to check on another table of cooperativa if this doctor has a…
-
0
votes2
answers47
viewsLatest records based on a filter
Next, I need to bring in a query the last records that were not changed in the last 3 days from a ID specific, ex.: (id_chamado_status = '1').
-
0
votes0
answers28
viewsSync failed? Myworkbench 6.3 --> phpMyAdmin
Good people, I’d like you to clear up a question for me and, if possible, help me. I designed a data model (myWorkBench) and then synchronized the data model.. After that, I have access to the…