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
answer187
views(PHP MYSQL)
Good morning, fellow programmers. I would like an aid, I have a database in mysql with a certain amount of users, and I need to take the interval of hours (ex: 10:00 until 14:00) and divide by the…
-
-1
votes3
answers103
viewsUse BETWEEN together with IN()
I would like to compare several dates within a range of dates. I tried to perform the query below but I cannot find a proper logic. Consultation with Array + BETWEEN in Mysql, or rather use the IN()…
-
-1
votes1
answer422
viewsHow to invert the order of loop results in PHP?
I wrote a code based on tutorials I saw to show User Comments Database information in tables but I would like it to reverse the order of the results. How can I do that? <?php // se o número de…
-
-1
votes2
answers53
viewsDelete data from Database
I am working with a database that has 2 tables, processes and processes, need to delete a data from the processes table, but the ID field of the process table is a foreing key in the processes…
-
-1
votes1
answer69
viewserror in my_sql to PDO conversion
I modified my connection page with the MYSQL database to PDO but it is showing error, could anyone help me? There is a file that pulls the necessary information from the database to be sent to the…
-
-1
votes1
answer111
viewsChange URL of all Mysql DBMS tables with PHP
I have a Mysql DBMS with several tables, I searched unsuccessfully how to do a routine, I need to change all URL’s of all tables to another URL. Ex: https://www.site1.com.br/ for…
-
-1
votes1
answer519
viewsHow to count the number of records (Rows) in an SQL statement?
I am in this SQL, recovering the records (number of vendors per city) of a table and I would like to count how many records have in each city. I want to put something like Tal City (9). I will put a…
-
-1
votes3
answers5007
viewsAccent error in mysql
I’m having accentuation problem in the database of my site. For example, in the database the text is "electric", but is posted on the site as "theTrical" I tried some things, but now instead of…
-
-1
votes2
answers74
viewsMysql query generating error when using the OR clause
I have the query used in WP and it causes an error when I use OR, follow the example of use: SELECT * FROM ' . $table_ucf . ' WHERE form LIKE "'. $this->form_active.'" AND name LIKE "%s" OR email…
-
-1
votes1
answer273
viewsCannot add Foreign key Constraint! but syntax and pks are correct
I’m trying to create a FK for a table, I don’t understand syntax error, but the TOAD returns the message that cannot create FK. Tables are created in the database, and Pks are right. ALTER TABLE…
-
-1
votes1
answer135
viewsHow to access a database using C
I wonder if you have any way to access a C database?
-
-1
votes1
answer78
viewsHow to change MYSQL database when 1 month registration date expires
I have a register of VIP users who make a payment that registration lasts 1 month. When payment is made, the status column of the users_vip table is updated to 1…
-
-1
votes1
answer201
viewsMake a select with 3 tables and return in table 3 the id records of the first
I have three tables, the first is occurrence, the second is to individuals and third vehicles. The individual tables and vehicles I made occurrences subformularios. I have the first key in the…
-
-1
votes2
answers2893
viewsChange date and date time format in Mysql
I do not want code to send the date converted to Mysql, I want to know if it is possible to show the date as 09/05/2018 09:59:54 instead of 2018-05-09 09:59:54. It is possible to change this in some…
-
-1
votes3
answers122
viewsGet the record name in the most repeating column
I need to display the record that repeats most in the column tipo_doenca from the column localidade, that is to exhibit the disease that is in the largest quantity in that locality. Table name:…
-
-1
votes1
answer268
viewsProblem listing data in JSP
I cannot do Data Listing. You are giving "Error Processing request", Servlet Path:/pages/data.jsp Path Info:null Query String:null... I don’t know what it is. Thank you for any help. OBS.: I’m…
-
-1
votes1
answer437
viewsWhat is the best database to store a list of information
I am thinking of developing a project, in this case a website. I will need to have a database connection, I will opt for the mysql. On the site people could create an account, and later create a…
-
-1
votes1
answer132
viewsHow to Merge 2 SELECT statements
How to unite these 2 selects? MY TABLES EVENT TITLE DESCRIPTION CATEGORY_ID CATEGORY NAME COLOR ICON DESCRIPTION this select below works perfectly does the right Count I need to do the same without…
-
-1
votes1
answer53
viewsI want the result of a query and SQL is simple...in PHP is confusing
I just want the result of one SELECT in php and I don’t know how to catch the result: $descricao = mysqli_query($this->conexao, "Select descricao from tabela where codigo = 1"); var_dump…
-
-1
votes2
answers458
views"expects Parameter 2 to be Resource" error when connecting to the database
I am trying to make a connection via php to a mysql server but always presents the following error: Warning: mysql_select_db() expects Parameter 2 to be Resource, null Given in…
-
-1
votes1
answer30
viewsHow to collect the running time of activities performed in the database without running directly in mysql
I need to get the runtime of several Serts , updates , alter Tables among other activity that I do in the bank , I know that if I did it directly in mysql it would return me at the end of the…
-
-1
votes3
answers1062
viewsPHP mysql User Registration Form
I just implemented this form (Form page) on my website, but I could not connect to the database to save the records. I used the mysql_connect and she gives that mistake: changed to mysqli and still…
-
-1
votes2
answers80
viewsInsert line in MYSQL without leaving the page (using PHP)
I have a music download system with a download button and I would like when clicking the button, it insert a line in the database, without leaving the page. Currently what I did is it open a new…
-
-1
votes1
answer54
viewsHow should I structure my database?
I am studying Mysql and have a user system. When the user logs into the account it is possible to create annotations. I imagine the right user table, but what about the notes? Should I create a…
-
-1
votes2
answers62
viewsPHP syntax error when inserting an image
I’m inserting an image into the database with the following code $nome_img = $_FILES['imagem']['name']; if(move_uploaded_file($_FILES['imagem']['tmp_name'], "images/Produtos/".$nome_img){ $query=…
-
-1
votes2
answers66
viewsI’m having problems with Mysql, I don’t know how to get media
I wanted to know the order average paid by billet on the Pay table, how I would do that?…
mysqlasked 6 years, 10 months ago Nathan Silva 87 -
-1
votes2
answers53
viewsHow to give an echo in the sport?
Array ( [0] => Array ( [Planos] => Array ( [id] => 57 [nome] => test [descricao] => test [valor] => 1.00 [status] => 0 …
-
-1
votes1
answer188
viewsEvent when closing tab/browser
Good guys blz, I wanted to know how to call an event when I close tab or browser and when to close I wanted to update mysql ex: logged in=1, then when it closes update to log in=0
-
-1
votes1
answer42
viewsEnter a column if it exists in ALL elements of another SQL
I have the following question : "Enter the "name3" that are in ALL "name" . And I have 4 tables that are below -- A (name,Num2, local) insert into A values ('Favela',1,'WE'); insert into A values…
-
-1
votes1
answer35
viewsinsert server_id in the creation of each registry, mysql
I have a table on mysql whose records can be created from different servers, these servers are configured as master and slave, and the id of each server has been defined as 1, 2, 3 etç. I wonder if…
-
-1
votes1
answer57
viewsHow to return multiple fields as a single array or string?
I have a table in the database with several phones, the name of the fields is numbered as follows: telefone1, telefone2, telefone3 your return is like this: Array ( [telefone1] => 190 [telefone2]…
-
-1
votes2
answers82
viewsTo obtain number of elements depending on the maximum number of elements per groups
I have two tables and I intend to get you the name table A depending on the Num3. For example, in the table A, we have the num2 and in the table B the values corresponding to the Num1. What I want…
-
-1
votes1
answer25
viewsWhy am I unable to fetch any data from a mysql table
what error there is in Foreach? <?php $banco = "mysql:dbnmae=banco;host=localhost"; $user = "root"; $senha = ""; try{ $conn= new PDO($banco,$user,$senha); echo "<h1>conectado com…
-
-1
votes1
answer46
viewsChat using php and msql
I wanted to know how I can with php get the id of another user online, without being by name, because there may be users with the same name. for example pull the id of another user, do not know how…
-
-1
votes2
answers327
viewsIncrease +1 in database
Well, I wanted to count +1 in mysql, and I’m not getting it. Code below <?php $con=mysqli_connect("localhost","root","asdasd","dbb"); if (mysqli_connect_errno()) { echo "Failed to connect to…
-
-1
votes1
answer344
viewsAlternative to Phpmyadmin
Can anyone tell me a database manager where I can build more complex queries without having to enter the query? Just clicking where I want to make a SELECT for example? I need to do several queries…
-
-1
votes2
answers29
viewsSelect database items that contain something similar to the contents of an array
Assuming I have the following array array("valor1", "valor2", "valor3", "valor4", "valor5") and I need to take all items from a Mysql table whose column X has value equal to one of these items, how…
-
-1
votes1
answer499
viewsSQL - Condition with Between
I have a form where the user can search for a date range, so far so good. If it searches only for a date, how can I do this in a direct way in sql or even in php ?! Any suggestions ?
-
-1
votes1
answer418
viewsremove repeated data in mysql
I have the following table called cadastro: Cod | name | age With the data: COD NOME IDADE 2 | rafael | 15 3 | bruno | 17 4 | rafael | 33 5 | sabrina | 18 6 | bruno | 15 7 | paulo | 15 8 | rafael |…
mysqlasked 6 years, 8 months ago Hugo Borges 5,294 -
-1
votes1
answer46
viewsCount database records without repeating
I have a table that has several records with the same information, example: id | nome | profissao 1 Carlos Pedreiro 2 Jean Garçon 3 Victor Pedreiro 4 Ana Paula Secretaria 5 Paula Secretaria 6 Karina…
-
-1
votes1
answer233
viewsHow is Java related to Mysql?
I want to develop an expense control software and I want to use Javaswing with Mysql. So I have a question about the database. I know it stays on a server, but when I compile the program and want to…
-
-1
votes1
answer491
viewsMysql, PHP and HTML communication
Good evening guys, I had already talked about this, but it seems like you’re not getting what I mean, so I’m going to go ahead and explain: As far as I’m concerned, I did everything right, in my…
-
-1
votes2
answers928
views -
-1
votes1
answer58
viewsQuery using WHERE
I need to make a query in a table called controls: I have the spine CH which is the workload in minutes and I have the column SETOR which are the sectors that have participated in some training. I…
-
-1
votes1
answer92
viewsPrint table data
I have in the following code: $sql = mysqli_query($strcon, "SELECT * FROM cadastro"); $exibe = mysqli_fetch_row($sql); echo "<table>"; echo "<tr><td>Nome:</td>"; echo…
-
-1
votes1
answer169
viewsTake data related to more than one table separately?
There’s no way I’m doing this. It seems to be with Join, but when I try, returns me zero records. I have the tables: TB1, TB2, TB3, TB4, TB...etc All with PK (ID) I tried that code: SELECT ID FROM…
-
-1
votes2
answers64
viewsHow to choose the database on login
I am developing a business management website, and for each company I will make a separate database so that there is no delay but queries and although a company does not see the data of another…
-
-1
votes2
answers56
viewsupdate from a vehicle plate code
I have 4 tables, the problem is that I have in the table the white color and I want to change the color only of a car that has the white color, changes of all cars with the white color. update…
-
-1
votes1
answer24
viewsQuery error using 1 Where and 2 joins in search query
Hello, I’m running the following query in mysql: select * from usuarios where login='gamboamurilo' or email='[email protected]' and senha='8b0a60f71e758c8b27e7688ee754cd85' inner join…
-
-1
votes1
answer117
viewscreate Linked in Mysql between different instances
Hello, I have instance A (Local) and another instance B, I need to do a query where I have table A (Local instance) relate to table B of (instance B) is possible ?