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
answer208
viewsInsertion in Mysql via PHP foreign key
I am creating a PHP and mysql application to manage people outside my company. The logic is this already inserted the Companies that I will associate to each entity People but when trying to insert…
-
0
votes1
answer315
viewsSee how long it takes for an event to happen - [mysql]
I’m new to mysql and has an event created in mysql database, and I was wondering if you have any way to check how much time is left for that event to run. That is possible?
-
0
votes1
answer85
viewsLevels of login access
How can I make it only show to the user who is with $cargo == 'Administrador'? I saw many being used with number, but I want to leave registered with name Administrator or Visitor and so in the…
-
0
votes2
answers60
viewsCalculate total orders and total orders for the current month with Mysql
I have this order table, I need to count the total order of each user and the total order of each user in the current month | id | id_user | name | data_criacao | | 1 | 10 |Pedro | 2018-05-01 | | 2…
mysqlasked 6 years, 4 months ago Daywison Ferreira Leal 101 -
0
votes2
answers85
viewsHow to create summation row at table end
I have a page with a table that shows information on the number of items expected to be performed and the number of items that were actually performed at the end of each month. If the quantity of…
-
0
votes1
answer15
viewsCatch the next event with Mysql
I have a system from which take the current day schedule and the next schedule, see: To get the current day’s schedule, I did it this way: // DataAgenda = NOW() mysqli_query($this-conexao,"SELECT *…
mysqlasked 6 years, 4 months ago user24136 -
0
votes1
answer1036
viewsGenerating unique identifier using time()
I created an algorithm to generate an identifier, which consists of a random value with 24 non-sequential characters. The goal is basically to capture the current time using time() and concatenate…
-
0
votes2
answers36
viewsI need a php variable to be placed in a href link
The variable $fa has to be placed inside the link, but I can’t do it This variable takes a database data, it is inside php code $fa=$aux["celular"]; <a href =…
-
0
votes1
answer5250
viewsHow to increase the size of varchar in Mysql?
I have a table and access via Mysql, I am using this command to increase the varchar from 50 to 60: alter table tabela alter column nome varchar(60) not null But I only get it in response: You have…
mysqlasked 6 years, 4 months ago Natã Minetto 104 -
0
votes1
answer819
viewsHow to hide table columns if there is no record in the database?
<?php // Pega o id do produto vindo da URL $id_produto = $_GET['produto']; ?> <table width="100%" class="table table-bordered table-inverse table-hover…
-
0
votes1
answer205
viewsMerge results from two tables
I need to make a SELECT in two tables and unite the results. My tables are "cursos_aula" and "cursos_progresso". In the table "cursos_aula" I have all the classes of a course. In the table "progress…
-
0
votes0
answers281
viewsCalling an HTML page by passing information to a Mysql database via PHP
Hello! I took on a project here at the company, where it was proposed to make a pre-questionnaire for the user before he accessed a questionnaire. Up to a certain point the user navigates between…
-
0
votes1
answer1335
viewsSize of a Mysql table with 200 million records
I am developing a system for a client, and I came across the following situation: he gave me a database, with phone numbers. And I have to create a routine, to generate new numbers for future…
mysqlasked 7 years, 11 months ago Marcos Paulo 649 -
0
votes1
answer70
viewsForm submission settings
Well guys, what happens... I created a php form to insert in my project, it happens that, always gives some error when sending, and the times I managed to send did not send all the data but only the…
-
0
votes1
answer685
viewsHow to transfer data from one table to another on different servers
I need to copy the records of a table that is in a Linked Mysql server to SQL Server, that is, transfer the records from one server to the other. Could someone tell me a way to perform this through…
-
0
votes1
answer55
viewshow to use the LPAD function with COUNT?
For example only: I am trying to select where a zero will be added to the left if the number is less than 10. Examples: SELECT COUNT(1); Returns => 1 SELECT LPAD(1, 2, 0); Returns => 01 SELECT…
-
0
votes1
answer40
viewsRepetitive java script message
I’m making a login system and it’s happening that every time the user presses the connect (send) button the messages accumulate, and the goal was only to appear once every time the user clicks on…
-
0
votes2
answers1381
viewsHow to create a Rigger to save updates from two tables?
I have two tables : Tabela1 : three-column id_product, product name, product price; table 2 : four-column id_brand, id_product, tag, price_tag; I created a new Tabela3 : three-column id_product,…
-
0
votes1
answer100
viewsComparison of database dates with system date
Hello! I need to compare the month of registration of information present in a database table with the current month provided by the system. In the database I register in a column the number for the…
-
0
votes0
answers33
viewsAutomate table fill
I have a table with the following structure: id - email - key_de_active I need to popular the key_de_active column with a random key (I already have the script to create this key), only it’s like,…
-
0
votes1
answer1081
viewsError: java.lang.Illegalargumentexception: id to load is required for loading
I am not able to save data in the database. I created a generated id to customize the primary key in the BD. The field is called id and he’s a String. I made a test class and it’s working, but when…
-
0
votes2
answers426
views -
0
votes1
answer34
viewsGet current week’s records
I have a system where the user registers the information in a Mysql database. One of the fields is Datacadastro of the kind Date() and that is registered only from Monday to Friday, that is, in the…
-
0
votes0
answers115
viewsHow to perform sub-discharge with auto-fill
Code that performed the consultation: $parametro = (isset($_GET['parametro'])) ? $_GET['parametro'] : ''; if($acao == 'consulta'): $sql = "SELECT codigo,preco FROM produtos "; $sql .= "WHERE…
-
0
votes0
answers96
viewsHow to use Google Analytics with Ionic 3
Good afternoon, I’m making an app using Ionic 3 and I use the Restful API with php for connection to the Mysql database, and I need to use Google Analytics in the project, but I can’t find a…
-
0
votes1
answer41
viewsUser connection location in Mysql or Mariadb
It is recommended that I change a user’s connection location from the table mysql.user? For example, I create a user 'danilo'@'localhost' but then I want it to connect from any machine, there’s…
-
0
votes1
answer1652
viewsHow to create a Trigger for a specific column of a table?
I created a Trigger to my table X, with the purpose of making a record of update that run you in this table. For each update on the table X, modified (old) values are stored in the table Z.…
-
0
votes0
answers90
viewsHow to send data, via POST, from android to PHP synchronously?
I need to send data to the database, and I’m using PHP. I was trying through the Ion library, but because it was asynchronous, the application featured Nullpointerexceptions when more than one data…
-
0
votes0
answers158
viewspersistent python Mysqldb connection
Because I have to keep opening and closing database connection memory consumption goes up? I wonder if I use an open connection always, I will have the advantage of decreasing memory consumption.…
-
0
votes4
answers5283
viewsSort a SELECT in Mysql by a letter
How can I make a SELECT query in Mysql that sorts the results and initially displays those that start with a specific letter? Ex with the letter P: Paul Patricia (1st ones starting with the letter)…
-
0
votes1
answer280
viewsStrange characters saved in MYSQL
My system is powered by an XML file every day. When saving to the database, Mysql saves one way and when rescuing this data using PHP it is displaying on the page as follows: Being that in these…
-
0
votes1
answer80
viewsRelationship between tables n to n
I’m creating a small project and I’m having a question. Let’s assume that I have a certain types of coffees, these coffees can be served in more than two cup sizes. As the relationship between the…
-
0
votes1
answer191
viewsProblem with empty Array with mysql and nodejs
This is the action that is activated by loading the page: In it I get the following array below. My problem is, when there is no record the ARRAY returns empty, I cannot pass a parameter to INPUT.…
-
0
votes1
answer265
viewsHow to access mysql base from an external network
I have an application, on Android with Mysql database, that works perfectly within a specific network. But when trying to access this same base on an external network I get the following message:…
-
0
votes3
answers636
viewsAverage all records in a table and update column in MYSQL
I need to do a Query that passes in all table records and updates the rate_general column (this column is the average of the rate_food + rate_service + rate_price + rate_environment / 4 ) notes of…
-
0
votes1
answer115
viewsError in the database
Well I’m developing an IT inventory besides giving some error , when inserting an 80 hard drive it only saves the zero and the other data is not entered either. how can I fix this . That is the code…
-
0
votes1
answer13
viewsHelp with ORDER BY clause by string
I have the following select command: select nome, case grau when 0 then 'QS' when 1 then 'CI' when 2 then 'CDC' when 3 then 'QM' end grau, case faixa when 0 then 'NÃO' when 1 then 'SIM' end faixa,…
-
0
votes0
answers28
viewsConnect my pc database to hosting
I want to connect the hosting in the local database of my PC I am using linux. I have ports 1604 and 8080 open. When I access my ip:port on an external network, I can access my website. But when I…
-
0
votes2
answers838
viewsPass txt database to mysql
Hello, I’m with a txt file where I wanted to get its contents to put in a database, but I’m having difficulties following an example of how this file: [03471] Nome=fulano Idade=20 Sexo=Masculino…
-
0
votes0
answers31
viewsRegistration (Log) of visits to a Website through IP and secure in a BD
After a survey I still haven’t found what I wanted. I wonder if you can help me in the reasoning for this feature. With PHP and Mysql it is possible to save visits to a Website in a database, and in…
-
0
votes0
answers19
viewsSend data from one database to another
Is there any way I can send data from one bank to another? If so, how could I do it? Example: I have site 1, it sends data to database 1, this data arrives in 1 and is automatically sent to database…
-
0
votes2
answers823
viewsHow to read comments from Mysql table fields?
This command SHOW COLUMNS FROM [table name]; Shows the fields of a table and the most important details of them I need to read the field comments, example: COLUMN cod_id INT(10) UNSIGNED NOT NULL…
-
0
votes1
answer34
viewsProblem in consultation
You are giving the error Warning: mysqli_num_rows() expects Parameter 1 to be mysqli_result, Boolean Given in. Can anyone help me? $mes = date('m'); $ano = date('Y'); $sql = mysqli_query($conn,…
-
0
votes1
answer499
viewsHow to read . sql file with Java
I have a complex query in Mysql with sub-select and joins. I would like to read this script through a file .sql using the language of JPA/Hibernate (JPQL or HQL), for example…
-
0
votes1
answer50
viewsHow to recover date field (mysql+php)?
I have a date field in mysql, the problem is that I can’t recover it by selecting it and printing only appears its name (date). $dados = mysqli_query($conexao, "SELECT 'data' FROM tabela");…
-
0
votes1
answer146
viewsI can create a table in mysql that shows the person’s age by subtracting today’s year - her birth year?
Question: I can create a table in mysql that shows the person’s age by subtracting today’s year minus her birth year? create table idade2 (ID auto_increment Primary key, data_nasc date, idade int as…
-
0
votes2
answers73
viewsHow to make a database search appear in a table?
A few days ago, I’ve been trying to get my comic book search to be presented internally to a bordered table. However, although the server does not return any error, no results are shown. I have…
-
0
votes1
answer250
viewsUpload . txt to Mysql database
Hello, I would like to upload a file .txt which meets the layout as follows (following example of two lines of the file): 9787546;488464;2016-12-11;Carlos Fonseca;carlos.fonseca…
-
0
votes1
answer531
viewsBest Mysql performance (one table or multiple tables)
What has better performance (or how best to do) in a Mysql database, multiple tables, for example 'purchases_cliente_01, purchases_cliente_02' or a 'purchase_clients' table with the client ID ?…
-
0
votes1
answer40
viewsTotal registered in Database with Script
my php page uses the following files "1-config.php = connects to the database" "2-total.php = connects to the Form and shows the total record on the page" in the html of my main page I use <?php…