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
votes1
answer1306
viewsCorrect way to record multiple records at once dbgrid and clientdataset
I have to record several records at once in the database, I’m using it in the form below, however I think giving applyupdate to each interaction is not the right way. There is another way? procedure…
-
1
votes2
answers1333
viewsHow to query data from two related tables?
I got this case down: (Tabelas) cidades: id, nome_cidade,local +--------+----------------+---------------+ | id | nome_cidade | Local | +--------+----------------+---------------+ | 1 | Rio de…
-
1
votes2
answers607
viewsPull data from db
I would like to pull the data from my db. But do not know how to connect, already have the configuration file, but do not know how to pull to use . Connection file: <?php define('BD_USER',…
-
1
votes1
answer86
viewsSearch counting result
I search for a certain term and show the result, what is correct, now I need to show the quantity of each product by category, for example, search by the term "chair". COZINHA (10) DORMITÓRIO (05)…
-
1
votes3
answers52
viewsMysql -> Assign Id’s to records
So I’m having doubts about something that might not be complicated, I wanted to assign values (id’s) to the records that return from this: SELECT * FROM `aldeias` where `userid`='-1' Doing this will…
-
1
votes1
answer78
viewsExport a search result to . Txt
I use Mysql Workbench. I would like to know how to save the result of a query in a txt file. and that is separated by tab, I have tried everything else of the right.
-
1
votes1
answer573
viewsSubcategory listing according to selected category
I have the following code snippet: <?php foreach($categorias as $cat){ $id_cat = $cat['id']; $subcategorias = array(); $sqlsub = Comando::Executar("SELECT * FROM subcategoria WHERE cat_pai =…
-
1
votes1
answer111
viewsProblem with SESSION in php
Good staff, I am here developing a login for my page but I have a problem that is not saving me in session the data I want can give me a help. Code require_once("../gtm/bd/funcoes.php"); ligarBd();…
-
1
votes2
answers2023
viewsPass table field as parameter in a precedent
I made this precedent to bring records from a table between dates, but I need to pass the date field of the table for the between command to work, follow the code: DELIMITER // CREATE PROCEDURE…
-
1
votes2
answers2695
viewsPerform backup automatico Mysql
I am using Mysql as DBMS, and when searching the internet a way to create a routine backup found that the old versions had a tool that no longer exists in the newer versions, I believe that those…
-
1
votes1
answer190
viewsHow to show certain data depending on who logged in
I have a question about login for several people. I have this code: <?php include("conectar.php"); $usuario = $_POST['usuario']; $senha = $_POST['senha']; $query = " SELECT count(*) FROM usuarios…
-
1
votes1
answer162
viewsDo not show banner with expired date
I am trying to show on my site banner s that are not expired date, I have in my bank a banner with the following dates: The current date is: 2015-02-07 Expiration Date: 2015-02-08 The script I made…
-
1
votes3
answers2776
viewsSend POST Textarea one value per line
I have a form with a textarea where it will have a value per line. Example: I need to send this value to the Mysql database. Then on another page I need to create a For to list these values. What…
-
1
votes1
answer784
viewsHow to delete all records of a belongsToMany
In the Laravel, when we have a relationship many for many, we have a method called attach and detach The attach adds entry into a relationship n:n, and the detach remove them. In both cases, these…
-
1
votes1
answer11627
viewsMysql ERROR - #1452 - Cannot add or update a Child Row
I have the following tables: CREATE TABLE IF NOT EXISTS `vagas` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `empresa` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `funcao` varchar(255)…
-
1
votes1
answer124
viewsProblem in Friendly Url
I have another problem with this line RewriteRule ^([a-zA-Z-0-9-_]+)$ index.php?controller=estabelecimentos&option=tipo&tipo=$1 [L] solved a problem but now I tried to create the same line…
-
1
votes1
answer69
viewsError trying to join 3 tables
I’m trying to unite three tables in my database, being them Propriedades | Licitacoes | Usuarios. Only every time of the same mistake! he is: Fatal error: Call to a member function fetchAll() on a…
-
1
votes1
answer58
viewsHow to view date ranges from another table?
I have a table with date ranges and another with sales data. How can I assemble a query that brings me the sales totals in the last 3 periods from the table datas_periodos ? Tabela (datas_periodos):…
-
1
votes1
answer51
viewsReturn query sorted by date, does not work
SELECT * FROM eventos ORDER BY Datainicio DESC I’m sending this to my mysql database is the first time I try to organize data by date, someone can tell me why my events don’t get sorted ?…
-
1
votes3
answers789
viewsException in sql query
How do I view my Mysql database items in php, so that you select all items except one item. Ex: I have several records... item 1 | id01 item 2 | id02 item 3 | id03 item 4 | id04 item 5 | id05 item 6…
-
1
votes1
answer218
viewsProblem with filter via JSON
Good night, I am here with a problem with filter via json for districts and counties I will explain. The user chooses a district and it filters and lists in another selectbox the counties that are…
-
1
votes1
answer173
viewsSwitching from mysql to mysqli
Speaks beauty person? So I’m about three days into this code. All mysql obsolence errors disappear, and I can navigate normally through the administrator area. However, when leaving the area and…
-
1
votes1
answer250
viewsChat with nodejs and mysql
I created a chat with nodejs and Mysql to search for information from user... but I have a following problem: when the connection drops or restart the server nodejs, do not go back logging user and…
-
1
votes0
answers431
viewsRegister in the database and process this data on the same page after registration
I have to make a script that when I put the email in the textarea it registers in the database and automatically after the registration it starts running the script that pulls the images through the…
-
1
votes1
answer405
viewsRequest jQuery Post + PHP + Mysql does not save data
I am making a registration via jQuery Ajax, so I created the following function: function salvarCadastro(titulo, form, caminho) { var dadosFormulario = $("#" + form).serialize(); var myData = $("#"…
-
1
votes0
answers192
viewsTruncated data LOAD DATA INFILE
I have a problem with load data, trying to insert the CSV file the data is truncated because in fields like comments or address. LOAD DATA INFILE 'exemplo.csv' INTO TABLE relat_produt_analistas_temp…
mysqlasked 9 years, 4 months ago Felipe Song 35 -
1
votes3
answers561
viewsSearch multiple Mysql tables
I have the following SQL SELECT * FROM cliente as c INNER JOIN cliente_contato as ct ON ct.nome LIKE '%{$pesquisa}%' OR ct.telefone LIKE '%{$pesquisa}%' JOIN cliente_ip as cip ON cip.detalhes LIKE…
-
1
votes2
answers328
viewsCommit using PHP
Defining SET AUTOCOMMIT=0 on connection but not working. I’m using $mysqli->real_connect() if (!$conn->options(MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT=0')) { $fErro .= '<p>Não foi possível…
-
1
votes2
answers94
viewsJquery for Followers Index
Good afternoon, And the following I have an area where users can follow other users need to know if with jquery when clicking below it is possible to insert the data in the table and change the…
-
1
votes2
answers917
viewsMysql: Windows or Linux?
Which one performs best for dedicated server with Mysql considering several complex calculations in Stored Procedure and Functions?
-
1
votes1
answer36
viewsBreaking up query fields
I’m doing a search with mysql, where the return is a field DATE, I need to dismember this field in DAY, MONTH, HOUR, SECONDS and put each one within a variable, I’m not able to do this, I tried to…
-
1
votes0
answers85
viewsAdd option in Magento "sex" field
I need to add an option in the "sex" field spelled "neutral". I know that where these attributes are in the database is in the table: eav_attribute_option_value But how do I add a new attribute…
-
1
votes1
answer442
viewsSearch first and last word of a record
I have a snippet of the code that picks up and the first and last user name of a table and stores in another table. For example.: Table users: Carlos Drummond de Andrade Picked up Carlos Andrade and…
-
1
votes1
answer124
viewsStore data in the database using PDO::commit
Hello... I never used PDO::Commit, but now I see the need to use ... and just now, even following the php doc and some examples on the net, I can’t store the data ... here’s my code: php connection.…
-
1
votes1
answer875
viewsHow to count the number of comma-separated items in Mysql?
I have a field in a table with data separated by comma: condicao_pagamento: 20,25,35,45,50. How do I count the number of comma-separated items using Mysql only?
-
1
votes2
answers6765
viewsHow to create a REST service with PHP and Mysql and . htaccess
I am developing a small project, where some information should be stored in a Mysql database that is hosted in a PHP hosting, I was wondering if there is a way to develop a REST service to insert…
-
1
votes0
answers141
viewsBring Older Results with Long Polling
I am creating a system and I want it to bring all the results already recorded in the database, but it only returns the recorded data from the moment I refresh the page, for example if I insert 10…
-
1
votes1
answer705
viewsInsertion in Mysql with radio button + <option> + input
How to enter the value of the <input> as the radio button is selected? A model is annexed hereto: $funcionario = $this->funcionario->get_all_funcionario(); if($funcionario->num_rows…
-
1
votes1
answer662
viewsComparison of Mysql hours
I have an agenda where I register an appointment, that commitment has Hora Inicial and Hora Final. However now when I register a new appointment I have to make a check to see if the hours are not…
-
1
votes1
answer2394
viewsCarousel Bootstrap + php
I have a Carousel in bootstrap, I wanted to do it with 3 images, as an example http://bootsnipp.com/snippets/featured/media-slider-carousel-bs3 But wanted to make it dynamic, follows below my code:…
-
1
votes2
answers560
viewsSelect 2 related and 1 unrelated tables in a query
I have this query below that returns me data from two related tables. It takes all vehicle fields and all product fields with equal "id_transfer" $cmd = "SELECT p.*, v.* FROM produtos AS p INNER…
-
1
votes1
answer54
viewsHow to organize Bdados results
Hi, I’m doing a movie site and would like a help on that part. After getting a connection to the BD, I want each record to appear within the grid that I made. I’ll explain it better with pictures.…
mysqlasked 9 years, 9 months ago Gustavo Lucksik 43 -
1
votes1
answer270
viewsAjax returns repeated content
And the following I have an ajax script that returns me an array with new data that exist in the database 1 in 1 second, this working the problem and that it always repeats me the content that is…
-
1
votes2
answers147
viewsUpdate running multiple times in a single instance
I have had a problem in my system that some pages that do UPDATE in stock tables sometimes run multiple times, so the page was not loaded twice because I created a protection account this. A single…
-
1
votes1
answer442
viewsProblem with Mysql Connector
I am using MVC 3, Entityframework 4 and Mysql database. I hosted my application on Locaweb. Unfortunately, I can’t connect the same thing to the database. Running the application on my local machine…
-
1
votes1
answer436
viewsCan’t connect to Mysql server on 'IP (4)
I have two servers with different purposes, one being a webserver running apache and php 5.3, and the other is a Mysql database server. The first uses the database in the second 24 hours a day, 7…
-
1
votes1
answer606
viewsUser control with PHP permissions
Good people took a system developed in PHP with mysql database running and passed me the task of creating user profiles or a tool for the system administrator to put what he wants the user to see,…
-
1
votes0
answers20
viewsHow to compare values in the database with accents?
Good, I’m having a problem with a search I did where the user filter content by district and county, is working well when I choose district and county without accents but when I choose a district…
-
1
votes2
answers606
viewsSelect category and subcategory within the same table
I have the table called modulos Inside it I include idModule, idModuloBase, module, folder and dating creation When the idModuloBase is 0, it is the category, if it is > 0, it is the completed…
-
1
votes1
answer4011
viewsUpdate sql with 2 conditions
I have a table with the column STATURE This column consists of 3 possible values: NEW, VISUALIZED, DISCARDED I have a function where I need to implement an SQL row that updates my table and changes…