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
votes0
answers114
viewsMysql access via MSSQL client
First of all I would like to inform you that my knowledge in SQL is of beginner... I have a proprietary MSSQL client application and would like to know if there is any way to get it to access the…
-
1
votes0
answers73
viewsVertabelo - Warning: Reference Name seems to be invalid
I’m using the vertabelo because I need to share my program with others, but when I brought my work to it. He appears the following warnings, someone knows what it is? link:…
-
1
votes0
answers618
viewsError: "Lock Wait timeout exceeded; Try restarting transaction" Mysql
I’m trying to feed a table in mysql with information from another table, but when I update it returns this error: Error: "Lock Wait timeout exceeded; Try restarting transaction". The update code is…
mysqlasked 8 years, 12 months ago Samuel Alves 11 -
1
votes1
answer389
viewsMulti-action and content notification system
I am trying to understand how best to make a notification scheme for multiple actions and nodes. Basically one should notify someone whenever an action of the type message or enjoy is performed.…
-
1
votes2
answers64
viewsQuery Query 1:N
I have the following tables: Tabela: estoque id_estoque nome Tabela: atributos id_atributo id_estoque nome And for example I need to know if there are 2 name attributes X and the name Y stocked Z.…
-
1
votes1
answer121
viewsGallery with PHP and Javascript not working correctly
I have a function in JavaScript that mounts an image gallery. It had this whole function in Javascript and it worked perfectly, now I need to insert the PHP so that the user can make changes to the…
-
1
votes1
answer573
viewsAdd values from the database column
I’m making a reporting system and the bank will have, for example: > - visualizacoes | 300 > - clicks | 20 > - data | 2015-06-03 > - visualizacoes | 230 > - clicks | 3 > - data |…
-
1
votes1
answer402
viewsCharacter override function does not work when data comes from mysql
I use a function to replace characters with accents or special characters, but when using the same function with data from MySQL the function is not replacing the characters. Assuming the city is…
-
1
votes2
answers95
viewsForm recording the same data
Good afternoon guys. I have a problem that I can’t find a solution. I made a form to record the registrations of a web site , but often this being saved the same registration several times (see…
-
1
votes0
answers31
viewsCan we avoid Sqlinjection with mysqli_real_scape_string only?
Example: $conexao = mysqli_connect("localhost", "user", "password", "my_db"); $pegaNome = $_POST['nome']; function insere($conexao, $pegaNome) { $nome = mysqli_real_scape_string($conexao, $nome);…
-
1
votes1
answer546
viewsProblem loading data with Entity Framework using Include
I’m using the Entity Framework with the Mysql on my system and I need to make a specific query that includes a list of a type of Model (ApplicationUser), in this list each returned object has in its…
c# mysql asp.net-mvc entity-framework lambda-expressionsasked 9 years, 5 months ago Luiz Negrini 1,424 -
1
votes1
answer109
viewsphp cycles with database
I’m having trouble with logic maybe. So here’s the thing: $secao="select distinct seccao from foto"; $manda= mysqli_query($ligacao, $secao); $array_sec=array(); while (($recebe=…
-
1
votes2
answers6796
viewsMysql error 1215: Cannot add foreign key constraint
How do I fix this mistake? I know one of the reasons for this is that the columns need to have the same size and specification. But I’ve tried everything and it’s not working. CREATE…
-
1
votes2
answers172
viewsQuery Performance in Mysql
I have in my form the option to perform a search for Rg or Cpf. So I got the question about the performance of the query using the following code: SELECT * FROM DADOSPESSOAIS WHERE (Rg = @Rg OR Cpf…
-
1
votes1
answer164
viewsHow to use SCOPE_IDENTITY in sqlite
I have a mobile application that inserts a BD registration and I need to return the ID of this registration, but I do not know how to use and I do not know if it works SCOPE_IDENTITY in sqlite, my…
-
1
votes1
answer1509
viewsInsert without specifying columns
I have several tables T1, T2... TN, each one can have columns in common or not. My final table F, contains all the columns (one time) of the previous ones. There is how I insert from each without…
-
1
votes1
answer147
viewsUpdate tables with the same data in the row
When I add a category A, and add a product X with the category A (table categories), then edit the category name A for category B, the category of product X (products table) remains with the…
-
1
votes1
answer41
viewshow to make a Join Inner picking up the description
my tables: agencias (id, nome_agencia, ads -> FK pra tabela de baixo) ads (id, nome, agencia -> essa é FK pra tabela anterior) the problem is this: each agency will have an ads in the ads has…
-
1
votes1
answer28
viewsReturn tags associated with posts
I use the query below to return all posts marked with the tag set: SELECT imprensa_posts.slug AS slug, tipo, titulo, data FROM imprensa_posts JOIN imprensa_tags_posts ON imprensa_tags_posts.id_post…
-
1
votes2
answers678
viewsI cannot bring the database data from more than one table
I’m learning how to do an admin, and then I created some tables in the database, but I don’t know why I can only insert and delete data from the user table and project table. Must be some silly…
-
1
votes1
answer92
viewsOptimization of SQL Query
I set up a series of SQL but I’m having difficulty generating something that stress less the server, I ask help from you. Follows the SQL: SELECT '2015-06-10 00:00:00' AS 'Hora', COUNT(id_contato)…
-
1
votes1
answer5100
viewsSELECT SUM MYSQL
I have the following MYSQL query: select v.id,valor_sap,month(dthr_operacao) as mes, fornecedor_nome from viagem v INNER JOIN agente_viagem av ON v.id = av.viagem_id INNER JOIN agente ON…
-
1
votes1
answer62
viewsCorrect way to send values through PDO
I was informed that I was doing it incorrectly, the phrase said was the following: "It does no good to use a newer API and keep the vices of the old mysql_*, you should not pass the values directly…
-
1
votes2
answers356
viewsTake id from last sale and register in the codsale field of the items table.
Hello, I have to register the sales made in two tables, (Sale and Itemvenda). In the sales table I have the fields id, codcliente, datavenda e total. In the table itemvenda have the fields id,…
-
1
votes2
answers868
viewsHow do I display a message if register found and if not found?
I have the following php routine: or die ("Não foi possível realizar a consulta ao banco de dados"); while($rowfoto2 = mysql_fetch_array($ridfoto2)) { How do I display a message if register found…
-
1
votes1
answer48
viewsHow to re-assign the ID colunda again?
I have a table for example | ID | NOME | | 2 | Ana | | 7 | João | | 15 | Vera | The ID column is ID int NOT NULL AUTO_INCREMENT, What I need to get? I intend for the column to stay | ID | NOME | | 1…
-
1
votes1
answer159
viewsI’m getting this error Can’t connect to local Mysql server through socket '/var/lib/mysql/mysql.Sock' (2)
Everything was working, but after a while I started constantly getting this mistake: Can’t connect to local Mysql server through socket '/var/lib/mysql/mysql.Sock' (2) The mysql server seems to be…
mysqlasked 8 years, 11 months ago Amadeu Antunes 3,331 -
1
votes3
answers799
viewsUndefined index error: user when submitting a POST form
Html <html> <body> <form action="encomenda_apagar.php" method="POST"> <br><br> <label class="sr-only" for="inputHelpBlock"></label> <b>INSIRA O SEU…
-
1
votes1
answer120
viewsUpdate error "Call to Undefined Function mysqli_sql()"
When performing the update is returned me the following error in the first result: Error: Fatal error: Call to Undefined Function mysqli_sql() in F: XAMPP htdocs PAPBRUNO PAPBRUNO…
-
1
votes2
answers424
viewsPass Mysql <option> values
Guys I’m having a hard time to perform a Submit of a specific field in case the <select> with 3 <option>. When I get the field to enter some data in the database it does not bring the…
-
1
votes3
answers74
viewsSQL Query autodelete
As I could make a self-deletable query in SQL, I would like to query such value and then delete in just one query. EX: select * from usuarios where nome=lucas that is to receive the search and…
-
1
votes1
answer115
viewsSelect to List data from another table
I have a system that registers personal data enc_dados_pessoais and another table that stores complementary data enc_dados_complementares. In the table personal data the user registers only the…
-
1
votes0
answers314
viewsHow to list products in categories?
Hello, I have this code to show the category menu: require_once ('./funcao/conecta.php'); $conn = conecta(); $sql = $conn->prepare("SELECT * FROM `loja`.`categorias` ORDER BY `nome_categoria`…
-
1
votes1
answer154
viewsIs it impossible to do trucate to a table with Foreign Keys even if it is empty?
Consider table "A" and "B". Table "B" has a Foreign Keys for table "A". Table "A" has no Foreign Keys. None of the tables have records. When trying to make a trucate to table "A", the following…
mysqlasked 8 years, 10 months ago Filipe Moraes 8,737 -
1
votes0
answers78
viewsBlock(reservation) of an auto increment line in mysql
I developed a data importer CSV to my base mysql. The Resource is working correctly, but I believe there must be a better way to implement the following logic. In the archive CSV depending or may…
-
1
votes2
answers90
viewsSearch for two Mysql tables in php
I have two tables that are: Registration Dorsal(id auto_increment Primary key); Name; Team; Classification Place(id auto_increment Primary key); Dorsal (Foreign key); and the following code in PHP:…
-
1
votes5
answers580
viewsDoubt in SQL query "between" or "in"
I am generating a report between date, as the figure below: However, when I enter the starting date: Initial year: 2014 Initial month: 6 and Final year: 2015 Final month: 5 does not bring the data,…
-
1
votes1
answer57
viewsSelect a product by establishment in mysql database!
I have a database with the tables estabelecimentos and produtos. Register the products relating to the establishments. I need to make a query where select only one product from each establishment, I…
-
1
votes3
answers412
viewsFilter records via datetime and bring them between an initial and final date
I have the balance table, that always when running a precedent, It is generated a new record in the same, You can have several record in the same day... However, when making a query, I want to bring…
-
1
votes1
answer848
viewsProblems with Mysql Server for OS X
Hello, Has anyone here managed to install the MySQL Server for Mac? I installed it, but I can’t start it! I click on its panel button, ask for the password, type and nothing. Trying for the…
-
1
votes1
answer47
viewsCalculate quantity by the whole number
I have to enter a record in the database according to an integer number. For example, 20, 21, 22, 23...29 I take the first number (in case 2) and enter 2 records. If it is 10, 11, 12, 13...19 (in…
-
1
votes1
answer79
viewsCannot add or update a Child Row
Good, I have these tables with the following structures: Athletes: id_atletas id_identificacao nome_completo licenca Identification: id_identificacao nome_pretendido data_nascimento The…
-
1
votes1
answer37
viewsOnly displays a php record
I have a list showing the records in php, and a hidden div that by clicking the link in each record opens this hidden div with a map. But when I add a record with the map link, it only shows a…
-
1
votes1
answer766
viewsUpdate with Select
I’m new to the forum and SQL. I use the Mysql Workbench DBMS to try to learn the syntax. Consulting a tutorial site, went to perform an update using a select, follows command line: update actor set…
-
1
votes2
answers920
viewsProblem with PHP login/logout
I have a small login/logout system in PHP/Mysql where when I log out, and try to log in again at the same time, the page does not enter. It only works after a few minutes. What would be?…
-
1
votes1
answer1644
viewsSave data to a table in the Mysql database using php
How to save data from top of column and row example have description(row) + date(column) + value (column)= same column row. <form name="frmitementrada" id="frmitementrada"> <table…
-
1
votes2
answers713
viewsProblem with UPDATE mysql
I have a problem executing an UPDATE command in my Database... My table has 2 columns: -Column 1: link (PK) varchar -Column 2: varchar status I need to update only the "statuz" field of my table.…
-
1
votes1
answer91
viewsHow to group comic book values?
I am rephrasing this question more clearly. I have the following challenge; I have a BD that contains 16 fields of information, this BD keeps bets placed in a system, to later be able to process the…
-
1
votes2
answers156
viewsSyntax error in SELECT, in PHP
I am putting the following code to make a query: SELECT * FROM tabela ORDER BY coluna WHERE ROWNUM = 5 However, when putting this in my PHP, the following message appears: You have an error in your…
-
1
votes1
answer1243
viewsUpload error [Function.move-uploaded-file]: failed to open stream: Permission denied
I’m trying to make a record where I have uploads of images and need to save all this content in different tables. The text part is saving perfectly but the photo part is not saving yet. Follow the…