Most voted "database" questions
A database (its abbreviation is BD, DB, database) is an organized collection of data typically used to model certain situations. Use this tag if you have questions about designing a database. If this is a specific database management system, like Mysql, for example, use this tag instead.
Learn more…3,414 questions
Sort by count of
-
-1
votes1
answer51
viewsCheck a single item in the PHP database
My query only returns one value, and this value needs to be used in another query. How can I take this value without putting it in an array? As it is done in the code it puts the value in an array,…
-
-1
votes1
answer33
viewsHow to add a new table 1:N (one for many) in an existing database via Migration Laravel?
Hello! I need to add a new table in an existing comic. I use the Laravel Framework and I would like to do this via Migration, but every time I try it makes a mistake and I don’t know what I might be…
-
-1
votes1
answer37
viewsImplode is not working right
I’m using this code include_once('../conexao.php'); $query = "SELECT titulo FROM info"; $result = mysqli_query($conexao, $query); $titulo = mysqli_fetch_assoc($result); <input type="text"…
-
-1
votes1
answer520
viewsmy code is giving "error in Count(): Parameter must be an array or an Object that Implements Countable in"
the two files that make connection and that: <?php include("classe/conexao.php"); if(isset($_POST['confirmar'])){ //1- Registro dos dados if(!isset($_SESSION)) session_start(); foreach($_POST as…
-
-1
votes1
answer55
viewsWhere to delete records that were entered a certain time ago
Help to create a delete with where if the record has been inserted for more than 5 minutes. I have the point marking table with the columns: cd_register - integer cd_enterprise - whole cd_matricula…
-
-1
votes1
answer109
viewsDelete repeats and return last Postgresql record
Good afternoon, I need to make a query to return the description of the records of a table, and there can be no repetitions of ID (of another table) and need to be the most recent record.…
-
-1
votes1
answer36
viewsSub-volume and average in Mysql
Given 3 tables of a database that simulates a sense of Brazilian municipalities: CREATE TABLE municipio (cod_mun char (7), nome varchar(50), cod_uf(2), CONSTRAINT municipio_pk PRIMARY KEY (cod_mun),…
-
-1
votes2
answers40
viewsI am unable to run this command line due to an error in php but n know which one!
Error that appears: Fatal error: Uncaught Error: Function name must be a string in C: xampp htdocs developed rs_alpinismo salva_mensagem.php:5 Stack trace: #0 {main} thrown in C: xampp htdocs…
-
-1
votes1
answer41
viewsHow to relate two form Fields in Django?
Good afternoon! I am new to Jango and I am creating a system that will serve as a spreadsheet to help in the analysis of some demands. The demands will be a certificate called CAT requested by…
-
-1
votes2
answers90
viewshide and show div of each column
Hello, I’m making a display page of customers registered in the database, I made a page where displays all the information registered in the database, more would like to hide all content by default…
-
-1
votes1
answer45
viewsHow to prevent a record when edited to save in duplicity?
This snippet of code saves the themes of a record. However, when I edit a record by adding a new client, the last theme of that record duplicates. That is, every time I edit a record it duplicates…
-
-1
votes1
answer56
viewsUse drop or iloc in Machine Learning modeling in Pandas?
I’m learning Machine Learning for Data Science through Pandas. I made a few algorithms and performed the division of my predictive variables and class as follows: dados = pd.read_csv(...) (...)…
-
-1
votes2
answers56
viewsHow to ignore a query line in the database?
I am trying to develop a code to create dynamic tables with php and mysql, using an Asterisk database. My first difficulty is that the recording of calls are duplicated (or quadrupled), if the…
-
-1
votes1
answer31
viewsStrategy for big queries
I’m working on an application that features a map and needs to render hundreds of thousands of markers. The data for rendering is in the database and the query is costly. There is also the challenge…
-
-1
votes2
answers49
viewsProblem when receiving data from the database with if/Else
Guys I have a problem in my php, I want to select the name of people according to a code and for this I made an IF, but the code that should take the values of the database and print on the page is…
-
-1
votes1
answer47
viewsFetch value of a condition on lines and separate into a new dataset
I have the following dataset I’m trying to create a dataset based on the dataset above. I am trying to search row by row values that are not Nan, export to a new dataset this value linked to column…
-
-1
votes1
answer177
viewsHow do I add information to an existing json file using python?
I’m trying to create a function to save data in a json file in python and I can’t do it without the old data being overwritten by the new ones (I want the old ones to remain and the new ones to be…
-
-1
votes1
answer83
viewsI need to make a Select in 3 different tables and do not know how to do
Next I need to make a query in the following conditions: I need the table data A (Numero, Ano, vencimento, Nome); seeking the information of unwelcome in the column Recebimento table B; and I need…
-
-1
votes1
answer35
viewsLaravel - Controller - Show data from two tables
I’m having trouble showing data for two related tables. Controller: public Function index(){ $tabela = capitulo::orderby('id', 'desc')->paginate(); $tabela1 = documentacao::orderby('id',…
-
-1
votes2
answers52
viewsDelete all items that have at least one Null value
I am needing to do a query that DOES NOT return the Ids of contracts that have ANY installments like Null, in the example below I need it to return empty, because the ID contract 666666 has at least…
-
-1
votes1
answer33
viewsSUBSELECT - POSSIBILITY OF IMPROVEMENT
I would like some guidance on a query. It is working, but the current script generates a very high reading demand in the bank due to a case comparing a table data, with another through a subselect…
-
-1
votes1
answer68
viewsHow to insert the average of a table into another table?
I created this bank: create table aluno( codaluno int primary key, nome varchar(30), datanasc date); create table curso( codcurso int primary key, descricao_c varchar(200)); create table disciplina(…
-
-1
votes1
answer45
viewsInsert INTO mysql and python error
When I try to make an INSERT INTO in my SQL code, it gives the same error mysql.connector.errors.DataError: 1292 (22007): Incorrect date value: '1998' for column 'validade' at row 1 This is my…
-
-1
votes1
answer7
viewsShow text on page from Django database
Hello, I’m trying to display a text from the mysql database, using Django, I’ve searched for several tutorials but nothing works, if anyone can help thank you already. This is part of my file:…
-
-1
votes1
answer46
viewsTrigger to prevent repeated data on ORACLE
Opa personal I am trying to create a Trigger to prevent the entry of repeated data in Oracle but am not succeeding. You cannot use Constraint Unique, because I will have repeated data, because it is…
-
-1
votes1
answer28
viewsExclusion of related tables
Good morning, I am trying to delete my user class but am having the following error "Cannot delete or update a Parent Row: a Foreign key Constraint fails (pitangdb.phone, CONSTRAINT…
-
-1
votes2
answers41
viewsHow to map values with Dataframe pandas
I am trying to create a new data column in pandas format based on two other dataframes. This first dataset is where I get the values: GenPart_pdgID = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 0 -4 4 23 23 23…
-
-1
votes1
answer27
viewsDoubt with relation of tables - Modeling
Next guys, to with 3 tables here, I’m in doubt how to relate them. I am studying relationship tables here... This project is a stock system, and has no intention, except to practice and study! My…
-
-1
votes1
answer45
viewsHelp with Select adding up accounts to pay and receive fields for MYSQL reporting
I have two tables equal fields, ACCOUNTS TO PAY and ACCOUNTS TO RECEIVE, I need to generate a report taking the value Credit - Debit and leaving result, someone can help me, I’m picking for this,…
-
-1
votes1
answer30
viewsTrigger to devalue apartment price if garage linked to it is excluded
I need to create a Rigger that devalues the value of the apartment when a garage linked to it is deleted, I have the following tables: create table apartamento ( numero varchar(5) not null, tipo…
-
-1
votes0
answers28
viewsPage does not take cities from the database, only the state
I have a page that selects the state in the database and after selected, it chooses the cities of that state, but can not get the cities, is only taking the state. Here is the main code that makes…
-
-1
votes0
answers18
viewsTable relationship modeling in Libreoffice Base
I’m working on a little personal project using Libreoffice Base. The idea is to make a small database to catalog my comic book collection. I am a complete beginner (both in Database and in…
-
-1
votes0
answers25
viewsTo what extent is it advantageous to use Nosql?
I’m developing a little app. It does not have a very large amount of data initially, but it would store for example user data (login), images, and some information in text format. But I intend to…
-
-1
votes0
answers7
viewsHelp to build a query in Mysql - Build a query between two tables, each table is in a different database
Gentlemen good afternoon I am a junior programmer, and I came across a situation in the company , which I can not solve , what happens , we need to compare two values , but each value is in a…
-
-1
votes0
answers18
viewsProblem using environment variables with Sequelize
I’m having a problem when I try to connect my database via Node setting environment variables. The variables I’m trying to set: file . env DIALECT_KEY='postgres' HOST_KEY=127.0.0.1…
-
-2
votes2
answers381
viewsDoubt in the logic of registration with codeigniter!
I have a "table" with the following fields: person, tree, date start (Default), datafim (Default), My doubt in logic is as follows: Register an employee and his area of responsibility with the start…
-
-2
votes2
answers152
viewsHow to make something expire after certain months in db?
I want to add a "license" for a purchase in my database, plus this license that my "customer" will buy will have an expiration date, let’s say he bought a license... INSERT INTO compras (userid,…
-
-2
votes3
answers493
viewsIs it bad practice to fill <select> <option></option> with data from the database?
It would be bad practice to use selects of HTML with items obtained through a database, even though they are dynamic (always occurring addition in the table that contain them). Example without a…
-
-2
votes1
answer722
viewstake input data in php + phpmyadmin database
How to get these html input by going to the phpmyadmin database Html class="section2" input type="radio"name="CumprimentoParada"id"A"value="CumprimentoParada"/> input…
-
-2
votes2
answers460
viewsWhat language do you learn?
I was beginning to learn to program, but it was still very slow. Only now I’m starting a systems analysis facul and I already have some startup ideas. As I intend to open some in the future, I will…
-
-2
votes1
answer204
viewsH2 database in Cronapp
I received the following message when trying to publish the application in Cronapp: "Your project uses an H2 database. Data persisted in this type of database may be lost due to distributed and…
-
-2
votes1
answer444
views -
-2
votes1
answer50
viewsAdd in BD in c#
I’m doing a little project in my college and I started to work with classes in c#, but I’m finding problems when it comes to inserting (my amount of values in Insert does not match values) in my BD…
-
-2
votes1
answer49
viewsWhat do you do when this happens?
I am working on a system in which I must register several data from a form in different tables using mysql. It works like this: The person makes a registration and in the same form requests a…
-
-2
votes1
answer115
viewsAdding an external variable to the php class
Hello folks I am creating a class for user data and would like to know how to insert a sternal variable containing data, for example from the database: class Usuario { public $nomecompleto; }…
-
-2
votes1
answer86
viewsHelp with Mysql connection
I’m creating a CRUD system for practices, and my code is making a mistake in mine prepare(). Index.php <?php require_once 'core/init.php'; // Abre a conexao com o banco de dados $pdo =…
-
-2
votes2
answers395
viewsMysql problems with DELETE
I’m having problems in mysql when recognizing delete function $code = '1234'; $conn = new PDO('mysql:host=localhost;dbname=data', 'root'); $stmt = $conn->prepare('SELECT * FROM codes WHERE…
-
-2
votes2
answers49
viewsData not saved in php database
I have the following code of a form so that the client can give his opinion, in navigating it shows success message, but does not record in the database. someone can help? <?php $Nome = $_POST…
-
-2
votes1
answer50
viewsPostgressql connection with Visual Studio
Good evening, I need to connect the database with the visual studio c#, but I don’t understand exactly how to accomplish and the materials I find are a bit confusing, if anyone can help I would be…
databaseasked 6 years, 7 months ago Jonathan Igor Bockorny Pereira 111 -
-2
votes1
answer168
viewsBank Modeling
I am trying to model a bench for a simple Pool for the World Cup games. It would be that way even? The idea is that the person can register and make guesses for each match informing a winner or…