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
-
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
votes2
answers139
viewsI can’t find the model generated by Artisan
I used the command php artisan make:model Exemplo and I couldn’t find where he saved this generated model so I could change it. I looked in the app/html folder and found nothing. My db is ready, so…
-
0
votes1
answer330
viewsI cannot restore database in mysql
I am trying to restore a DBS I have on my machine, but unfortunately I am having problems... ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL…
-
0
votes0
answers136
viewsAdd Dynamic line values in the Database
I have this table above , and I have the add button to add a row to this table , as in the image below. I wonder if you have how to save this new data from the line added in the database follows my…
-
0
votes1
answer41
viewsSqlserver in repositories
I have to send an application project through a Github repository, I managed to make the application work perfectly front-End, Back-End and LOCAL database, my doubt is: Can I export Sqlserver to a…
-
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
answer33
viewsEnter data in db by php
I am trying to register data in the database by php, but it does not register in utf8, but when I register directly in the database it registers in uf8. <?php include("conecta.php"); function…
-
0
votes1
answer49
viewsDifficulty adding PHP MYSQL data
Well, the title itself is self-explanatory. Perhaps the only relevant detail I can add, is the fact that when performing the operation I get no error, nor Warning. Thank you in advance for your…
-
0
votes1
answer649
viewsRelationship 1:1
I’m having problems in the relationship of my tables products and stock. The stock table is responsible for storing the quantity of each item in the products table and the date when the product went…
-
0
votes2
answers95
views -
0
votes1
answer348
viewsUsing Case in Order By with Union
I’m having trouble using Order by com Case on Union, so it works: select tb_a.nr_rua, tb_a.cod_altura, tb_a.cod_posicao, tb_a.cod_lado where ...... union all select tb_b.nr_rua, tb_b.cod_altura,…
-
0
votes0
answers56
viewsfail, log data into Database
Hello, I’m having some problems trying to register the form data in the bd, Form code: <form class="form-horizontal" method="post" action="processa/proc_cad_star.php"> <div…
-
0
votes1
answer305
viewsDAO files in PHP required?
I wonder if DAO classes are required in PHP? Ex: Productodao I see many people programming without putting same DAO files on a MVC platform. I am learning Object-Oriented programming at my college,…
-
0
votes1
answer659
viewsPhp - Pick variable by _GET or _POST? How to make name appears instead of Cpf
Well, I’m doing a project where the student enters by Cpf and date of birth. However, in the user div <div=class"user"> in home.php (where the greeting and user name should be) Cpf appears…
-
0
votes0
answers498
viewsError entering registration: "No such table" - can anyone help me?
I am developing the registration for my application, but I have an error at the time of registering (insert function), an error that I do not know how to solve, it is in the image: Registration…
-
0
votes1
answer304
viewsReal-time database replication
We have a client who needs to perform several queries in the database in a short period of time, something approaching 40,000 requests in less than 2 hours. I created a program that bridges the gap…
-
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
votes1
answer188
viewsCreate view by transforming deleting or transforming DATE into VARCHAR in ORACLE
I have a table with 58 different columns and would like to create a View treat the fields DATE as SWEEP, without me having to discriminate all the columns in the creation of View. CREATE VIEW…
-
0
votes0
answers28
viewsHow to escape a recursive process of saving error log from a database - PHP?
I have a class that saves the log in a database based on any transaction error on that basis. The fact is that the process of saving this log tbm is a transaction and in a hypothetical scenario any…
-
0
votes2
answers99
viewsTrigger for table optimization
I’m trying to create a trigger which rotates the control OPTIMIZE mysql. In short, I have an A table and created a B table that will save a datetime where this value will be updated every time the…
-
0
votes1
answer577
viewsWhy can’t I make the connection to Postgresql?
I’m very interested in programming but I’m new in the area and I need to give this work to the teacher. But I can’t solve this mistake. package dal; import java.sql.*; import…
-
0
votes1
answer2414
viewsIs it possible to change the theme or colors of the Workbench?
I’d like to leave the background black to dull the vision less. Thank you in advance!
-
0
votes2
answers214
viewsHow to store record in new column within wp_users table? (Wordpress)
After the user fills in a registration form, this form goes through all validations, the data needs to be entered in the table wp_users, The function below is doing that role in my THEME: $user_id =…
-
0
votes2
answers974
viewsInsert several Items with the same IDPEDIDO Sql Sever
Hello How can I enter multiple items for a single Primarykey autoincrement ID of there will still be columns of the Idproducts where I want to insert several items for an Id_request as I do this…
-
0
votes1
answer160
viewsKnow the position on a listing
I’m wearing this query to know a user’s feedback quantity: $comentarios = $pdo->query("SELECT * FROM topicos_comentarios WHERE autor='".$ver['autor']."'")->rowCount(); However, I would like to…
-
0
votes1
answer462
viewsHow to store more than one value using Sharedpreferences?
I’m making an app where I created a checkbox to represent a favorite item. The problem I’m having is that when I put more than one item as a favorite, the last one replaces the first one, that is,…
-
0
votes1
answer59
viewsHelp to display database data on the screen
I am doing an INNER JOIN between two tables of my bank. But I’m having trouble showing the organized result on the screen, could someone help me? The tables are of category and service (related to…
-
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
votes2
answers490
viewsXamarin (Visual Studio) x POSTGRESQL
Good evening, you guys, I work in a company of development of commercial automation software, A Alterdata, and today I work directly with Postgresql, and I have a lot of affinity with it. I wonder…
-
0
votes1
answer23
viewsChanging Fields in Database
Hi! I created a database with a table of Treinamentos who owns Nome, Validade and Status as fields, but when the current date passes from the expiration date the field status, that is 1 for active…
-
0
votes1
answer1961
viewshow to calculate the storage volume of a database
The thing is, I’m having concerns about a database being used in a project. The project consists of the development of a software to unite the respective data to two solar spectrum sensors, and then…
-
0
votes0
answers53
viewsFatal Error Connecting to Mysql
I’m getting an error when connecting to database Php code: <?php $siteA = 'http://www.'.$_SERVER['SERVER_NAME'].'/'; $siteB = '/'; $email_suporte_staff = '[email protected]'; global $siteB;…
-
0
votes1
answer139
viewsHow to populate database tables with textbox data
In the external PHP file I have the following code: <!DOCTYPE html> <?php $servername = "localhost"; $username = "isabelso_isabel"; $password = "password"; $dbname = "isabelso_db"; $dbconn…
-
0
votes0
answers84
viewsAdd SQL base to a letter
Good afternoon! In a database I have two tables. A so-called Accounts, where you have for example a column of accounts 1(Active), 1111(Cash), 1112(Banks), 1113(Receipts). Another table called Values…
-
0
votes1
answer86
viewsconnect to multiple sqlserver databases
Good evening, I’m developing a system in MVC 5 and c#, I have two SQLSERVER database, one for Development and one for Production. I ask to know how to configure Webconfig to accept these two…
-
0
votes2
answers1581
viewsFunction with Insert according to a select that returns a list of ID’s - Postgresql
I need to make a Rigger after insert calling a function that takes the last record inserted into a certain table and inserts the ID of that last record into another table according to a select that…
-
0
votes1
answer101
viewsProblem with wp_termmeta table
The following error is permanently occurring, recorded in my error_log: Error in Wordpress Table database 'odiletan_bd.wpTP737termmeta' doesn't exist na query SELECT term_id, meta_key, meta_value…
-
0
votes1
answer85
viewsEnvironment for Android database testing
I am developing a simple application with Android Studio, using Java as a language. Currently, I am implementing the login and logout routine and I have some doubts. 1° ) Is there a need for me to…
-
0
votes1
answer136
viewsI need to update my Acces(.mdb) database from an external computer
Hello, I have a client with two stores and I need the database to be interlaced. I need a north on how to start studying this. Obs: the database is local, not in the cloud
-
0
votes1
answer101
viewsForeign key with more than 1 value
I’m working on the construction of my TCC and a problem has arisen. I have a schedule table, and this table needs to store some data, among them, the activities that will be spent during the year.…
-
0
votes2
answers99
viewsHow to compare email and word passes from textboxs to the database
I already have this code: <?php ... $dbconn = mysqli_connect($servername, $username, $password, $dbname)or die("Failed to connect to database:" . mysqli_error($conn)); $email =…
-
0
votes1
answer150
viewsExercise involving Function in Postgresql
The question would be as follows: With the following Bank: Telefone (id, numero, operadora_id) Cliente (id, cpf, nome, rg, sexo, uf) Operadora (id, nome, cnpj) Contrato(id, cliente_id, telefone_id,…
-
0
votes1
answer204
viewsHow to do column operations where you give nicknames?
I have the following hypothetical consultation with the bank: SELECT dinheiro_na_carteira, (SELECT sum(despesas_pagas_carteira) FROM DESPESAS WHERE id = X ) as despesas FROM RECEITAS WHERE…
-
0
votes1
answer69
viewsSQL Server Code for Question
After 1 hour back of this question I cannot solve the code for it. Can anyone help me? Question: "Indicate the number of drivers per brand of car" The SQL Server tables created were the following:…
-
0
votes2
answers559
viewsColor an image or div with the value of a field in the database
I wonder if it is possible to put the color code that is saved in the database in an image/div/icone. Working like this, the person fills in the form and chooses a color to be the color of her…
-
0
votes1
answer98
viewsQuestion for SQL Server - Code
What are the names of the pilots who did less than '1:12' in the 1st round of the 2nd race? How can I make the times of every turn? I’ll have to make a new table? The SQL Server tables created were…
-
0
votes2
answers38
viewsWhy aren’t you comparing?
I have this code to compare the email and password that are in the database, but it is always possible that the data is wrong, not letting in. What’s wrong with the code, can help me? <?php…
-
0
votes1
answer100
viewsChange database instance
I am doing a project in MVC and my problem is that my database is automatically created in the "localdb" instance, but I wanted it to be created in my instance that I created in SQL Server. Is there…
-
0
votes1
answer546
viewsCan a foreign key be part of more than one table?
I wonder if I can put a foreign key in more than one table, for example, where the entity "competitors" in the image is a table and the attribute "id_competitor" is a primary key, and the other…
-
0
votes1
answer538
viewsView Java Database Values
I’m a beginner in Java and I’m making a mini RPG-style program for Database Testing, and I want to display the data contained in the BD using a ArrayList, but the result of the exhibition is always…