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
votes2
answers171
viewsPDO error with variable in LIMIT
In PDO today was the first time I had to put a variable in LIMIT, and I’m getting this error: Fatal error: Uncaught Exception 'Pdoexception' with message 'SQLSTATE[HY093]: Invalid Parameter number:…
-
1
votes1
answer527
viewsUse Date Field in Java with Mysql
I’m having a little problem, I’m running a test using the data(Date) field in Java, and I’m having problems running. Below are the codes I’m using: 1º o Code to create table in Mysql Create table…
-
1
votes1
answer192
viewsIn a dependent SELECT, with data of cities of a table how to leave a city in evidence?
In a database, I have the States table and the Cities table. On the website, when I choose a state, the list of cities is populated according to it. In my code, it is to appear alphabetically, but I…
-
1
votes1
answer770
viewsAutomatically delete a record from a table after a time interval
How do I after a time interval the record is automatically deleted, as in a shopping cart, for example?
-
1
votes1
answer87
viewsOptimizing a Mysql table with 40 fields
Hello, people! I have a table in Mysql with 40 fields, it is a system of resumes. I am optimizing both the table and the queries performed in PHP. The point is that to perform searches for specific…
-
1
votes1
answer1132
viewsProblems with PHP connection -> Mysql
Error Warning: mysqli_connect() [Function.mysqli-connect]: (HY000/1130): Host '10.1.1.25' is not allowed to connect to this Mysql server in /home/a1570220/public_html/Register.php on line 2 Warning:…
-
1
votes1
answer52
viewsForm sending to the bank when updating the page
Hi, I have a problem with my application which is as follows:. I fill all the fields and click the send button and it works fine. When I give an F5 to update the site, it forwards the same…
-
1
votes1
answer350
viewsPDO PHP: How to make a logged-in user delete their account?
The user accesses the logged in page: <?php session_start(); echo 'Bem vindo, '.$_SESSION['username']; ?> <br /><a href='logout.php'>Logout</a> I want him to press a button…
-
1
votes1
answer410
viewsGet totals by date range, relating to additional table
The case is as follows, I have a table in Mysql referring to a company box, and I am creating a table in JAVA that will be a cost center. The database table has the columns: id | data | descricao |…
mysqlasked 8 years, 3 months ago Roberto Gomes 455 -
1
votes1
answer57
viewsMysql - Foreign Key constraint between tables
Below I created 4 dummy tables for illustration The Teacher and Student tables are referenced by Address and Documents. However, how can I create a foreign key in the last two tables referencing…
mysqlasked 6 years, 11 months ago Jhonatan Pereira 537 -
1
votes2
answers316
viewsTake the value of a string within a PHP variable
$a = " A=1 B=2"; I need to use echo in $a and display the value of B. I don’t want to use array. It’s because I’ll create a column in the database where it will house all active options. And I don’t…
-
1
votes2
answers74
viewsInvoices not paid more than 10 days
I have a table of invoices and customers. In the invoice table, for example, I have the cliente_id, status and date fields In client table id, name, etc... What I need is to list all the invoices,…
-
1
votes1
answer49
viewsError in php connection file for mysql database
Mistakes: Warning: mysqli_stmt_bind_param() expects Parameter 1 to be mysqli_stmt, Boolean Given in /home/a9630388/public_html/Register.php on line 7 Free Web Hosting PHP Error Message Warning:…
-
1
votes1
answer184
viewsSearch PHP + SQL does not find results without typing the "-" hyphen
Hello! I have a search for automotive products where the user can search for the company code, original code, product line, automaker or vehicle. This system is working if in the search field I…
-
1
votes2
answers234
viewsConfirmation question before entering into database
I have the following page of Insert: <?php include("conn_sys.php"); $setor = $_POST ["setor"]; $fornec = $_POST ["fornec"]; $desc = $_POST ["desc"]; $id_usuario = $_POST ["id_usuario"]; $login =…
-
1
votes3
answers2770
viewsSelect from the line with the highest ID
I have the val_products table, where you have id_product and product value, I need to select * only on the line whose ID is the largest, for example, I have two products with ID’s 1 and 2, but I…
-
1
votes1
answer182
views -
1
votes2
answers167
viewsError with SQL and Mariadb (Current position is before the first Row)
I have a problem in my database and I have no idea what it is. public String getBlockPermission(String blockstring){ String permission = ""; try{ ResultSet res =…
-
1
votes1
answer166
viewsPass Mysql query to Eloquent Laravel
I have a query that when passing to eloquent returns me syntax error. SELECT order_id FROM timelines WHERE order_id NOT IN (SELECT order_id FROM timelines WHERE supplier_approved_id) AND supplier_id…
-
1
votes2
answers117
viewsRecover parameter to filter in SQL: date and time every minute
I have a table with a column called values and it has the following columns: ID, VALUE and DATE. I have a while in PHP that counts 24 hours, so I need to recover the records every 30 minutes. I need…
-
1
votes2
answers39
viewsFilter result by date
My problem is, when I run the command below: SELECT Id_produto AS Produto, Quantidade AS quantidade, genius.vendas.data_venda AS Periodo FROM genius.itens_venda LEFT JOIN genius.vendas ON vendas.Id…
mysqlasked 8 years, 3 months ago Roberto Gomes 455 -
1
votes1
answer3995
viewsMysql server with Xampp to be accessed by another machine?
I am a complete beginner in dealing with Web programming and local and remote servers, my notion on these subjects is quite partial. Well, I have a system that will need access to a Mysql database.…
-
1
votes0
answers80
viewsChange column header with formula
I searched infinity on the internet and did not find, hope someone can help me, I have the following table: the numbers -1, -2, -3... represent the months, that is, past month(-1), past tense(-2)...…
mysqlasked 8 years, 3 months ago Roberto Gomes 455 -
1
votes1
answer100
viewsHow to handle elements of an array individually?
Greetings gentlemen, I’m trying to design a portal where my clients can view their invoices, statements and bills. As you can see it’s all very amateur, but it’s almost ready to do what I need.…
-
1
votes1
answer1136
viewsHow to adjust the entire screen according to the resolution of the monitor?
How to adjust the entire screen according to the resolution of the monitor? See the image below: My Dashboard is getting like in the picture B how could I make to look like a To. I’m using php +…
-
1
votes1
answer109
viewsShow date automatically when creating form
I have this code: <p><h5><strong>Data de Atribuição</strong></h5> <input id="DataAtribuicao" type="text" name="DataAtribuicao" value='<?php echo date("d/m/Y");…
-
1
votes2
answers287
viewsHow to monitor database changes without making abusive queries
I have a code that accesses the database every second and returns me the number of rows of a table, the problem is that an abusive number of requests and queries are made in the database to monitor…
-
1
votes1
answer251
viewsError in update sql: Subquery returned more than 1 value. This is not permitted when the subquery Follows
I am performing a query to change the net cost of a product according to a brand, however, I get the following error message: Subquery returned more than 1 value. This is not permitted when the…
-
1
votes2
answers531
viewsError 1093 in Mysql
Follow my Mysql code: create schema if not exists Faculdade; use faculdade; create table if not exists Alunos ( RA integer UNSIGNED not null, senha varchar(15) not null, nome varchar(100) not null,…
-
1
votes1
answer187
viewsAverage values where fields are equal
I have a table, in bank mysql, that receives some data regarding evaluations. How can I calculate the average of these evaluations directly on query, based on the question? I tried several ways,…
-
1
votes0
answers92
viewsHow to create a dynamic query with Left Join?
How can I leave this query dynamic , she is already working only that she only lists one semester each year and wanted her to list two, like when I select the first she lists the first and when I…
-
1
votes1
answer81
viewsReuse the result of a function in Where
Hello, I am working with MYSQL, I wonder if I can use the result of a function in Where, calling by alias. today I have to repeat the code, in case that GEO function SELECT…
mysqlasked 6 years, 10 months ago Eduardo Dos Santos 28 -
1
votes1
answer554
viewsError trying to register data in the database (mysql) via PHP
I’m trying to insert some data in the database via php, however this returning me error, apparently this connecting, I can not find an error actually not know much of php, I’ve been following…
-
1
votes1
answer83
viewsData problem in mysql and java
I’m trying to use the date of a jYearChoser and a jMonthChoser to search for a full month sale, already tested at the Mysql prompt and worked perfectly with the command below: SELECT…
-
1
votes1
answer633
viewsSelect Returning Null from Database
I am trying to make a Login page and am using JaVA,JPA,WIldfly,Primefaces and in the database MYSQL. I’m passing the name and password, but at the time of inspecting it returns me null, by playing…
-
1
votes2
answers479
viewsTrigger to connect multiple records
I have 3 tables: Usuarios (id, nome) Desafios (id, descricao) Usuarios_tem_desafios (id_usuario, id_desafio, status) The goal is, when adding a new user, to fill the table Usuarios_tem_desafios with…
-
1
votes1
answer194
viewsSelecting multiple fields from a table with a term in the query
I tried to follow some steps I found here in the bad forum did not work... I have this code here in the codeigniter model: // buscando clientes $this->db->like('nomeCliente',$termo);…
-
1
votes1
answer2522
viewsCalculate average call time
Guys, I need to take the average attendance time and I have the following data: 00:12:35 00:05:10 00:01:42 00:08:12 00:01:01 {...} The question is, how can I do it? I searched for a way to do it…
-
1
votes2
answers82
viewsRelationship of 1 attribute with different tables
Everybody, good afternoon, everybody. I’m modeling my database (Mysql) and a question has arisen. In the bank, among others, I have the following tables: Employees - Sectors - Subsidiaries An…
-
1
votes1
answer266
viewsUsing Inner Join correctly and aggregating results
In my comic book, I have 4 tables: Aluno, Ano, Matérias and Nota. They are mounted as follows: Tabela :: Colunas ---------------------------------------------------------- Aluno :: AlunoID |…
-
1
votes2
answers518
viewsImport database without table data directly from Mysql
I am needing to import into Mysql a very large database. By phpmyadmin almost stopped the server. Then I tried directly from Mysql using the command: source /var/www/html/sistema/basedados.sql Okay,…
mysqlasked 6 years, 10 months ago user24136 -
1
votes1
answer1034
viewsInvalid Mysql PHP PDO Data Source
I’m having problems connecting PDO to mysql database. Database_connection.php: <?php class Database_connection { private $db_host = "local"; private $db_name = "root"; private $db_user = "user";…
-
1
votes1
answer1558
viewsAdd Mysql + PHP fields
I have the code below where I need to add the value of a column (Mysql) and the result of this sum, subtract by any value, example: 5000 and the result of this operation is passed to the PHP page.…
-
1
votes0
answers83
viewsBlock entries beyond the value stipulated in PHP form
I have a course administration system where the teacher registers a class and the student accesses a page with a table with all classes and enrolls in what he thinks best. The problem is that many…
-
1
votes2
answers101
viewsHow to select a field with MAX()+1 and use in an INSERT?
I have the following code: $Position = $this->conn->prepare("SELECT MAX(OrderTask)+1 as OrderNew FROM tasks"); $Position->execute(); $newPosition = $Position->fetchAll(PDO::FETCH_NUM);…
-
1
votes1
answer100
viewsError in query syntax in Preparestatement
I’m getting this error message and I can’t find why: You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use near '?,? ,? )'…
-
1
votes2
answers4641
viewsHow to store a SELECT value in a MYSQL variable?
It’s something very simple but I can’t find the information I want, people! I saw once how to do it but it was very shallow, but I’ll explain what I want: I have a variable and I want it to receive…
mysqlasked 6 years, 10 months ago Bruno Henrique 122 -
1
votes1
answer1618
viewsjava.lang.Classnotfoundexception: Could not load requested class : com.mysql.jdbc.Driver
I have a Dynamic Web Project in Eclipse and have been constantly receiving this error: java.lang.Classnotfoundexception: Could not load requested class : com.mysql.jdbc.Driver. My persistence.xml…
-
1
votes0
answers33
viewsHow to make a select depending on some conditions that comes by parameters in Laravel 4.2?
My problem is this.... I have a route that receives the year and month to seek some information in the bank. When the month doesn’t come I need to be made the sum of all the months of the requested…
-
1
votes0
answers44
viewsMysql for Excel
I connect to the BD, click but when editing the folder is password protected. I tried to enter the BD password and nothing. Someone had that problem, could give a help?…