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
-
0
votes1
answer611
viewsSelect from two tables and insert into two other at the same time
I have four tables tabela A aic002 campos : codigo data nome especie valor rg cpf exped Tabela B excli campos codigo nome rg cpf exped tabela C imovel Campos codigo imovel rua bairro cidade estado…
-
0
votes1
answer256
viewsArray php go through
To the array: Array ( [45] => Array ( [car] => stdClass Object ( [consortiums] => stdClass Object ( ), [92] => Array ( [car] => stdClass Object ( [consortiums] => stdClass Object (…
-
0
votes2
answers83
viewsMysql connection to Delphi6
I need to make database connection MySQL using DELPHI6. Someone has a solution?
-
0
votes2
answers748
viewsWhile incrementing datetime field in MYSQL
I need to do a while between an initial date and a final date, that is, while the initial date is less than the final, will return a query, how can I increment this while to make it run?
-
0
votes1
answer70
viewsGroup results of queries
The process below makes one query per day between the initial and final dates, so it brings several queries, there is a way to group all queries generated in only one? And yet, how to eliminate the…
-
0
votes4
answers79
viewsError in SQL like
I’m trying to make a select where I want all the data of a person who has the same ip and date equal to today’s date. The reason is that I need to restrict as many times as a person sends contact to…
-
0
votes1
answer882
viewscreate variable from the result of a query and use that variable in another query
is the following, to make a query in the database with php! The code I use is the following: <?php $rs = $pdo->query(" SELECT * FROM licitacoes WHERE ID_USER = '$IDLOGADO' ")->fetchAll();…
-
0
votes1
answer154
viewsAdd the same product in various categories
Good And the following I have a table categories and another table products at this time when creating the product I select the category to which it belongs by selectbox only now I have the need to…
-
0
votes2
answers534
viewsProblem with function that generates friendly url
Good I have a function that generates the name for the friendly urls but I’m having a problem that when the function generates the name if that name contains accents it does not put the same word…
-
0
votes1
answer55
viewsProblem when selecting php checkbox
Good I am with the following problem I am entering multiple data through checkbox that part already working now I wanted to do the validation to mark the box of those that are already inserted in…
-
0
votes1
answer90
viewsDelete data by checkbox
Well personal I am here with a problem I have in my system categories where I insert the products in the various categories you can choose through checkbox only now I am facing a problem and I want…
-
0
votes2
answers513
viewsMYSQL - Column order and performance
I may be asking a silly question, but come on. The order of the columns in the MYSQL interferes something in terms of performance in some way (whether in writing or in research)? Foreign keys are at…
-
0
votes1
answer65
viewsshow table data between two chosen dates (dates are in varchar)
SELECT * FROM minhaTabela WHERE status=2 AND nomePessoa='Jose Silva' AND STR_TO_DATE(data_enviado, '%d/%m/%Y') BETWEEN STR_TO_DATE('01/05/2015', '%d/%m/%Y') AND STR_TO_DATE('31/06/2015', '%d/%m/%Y')…
-
0
votes0
answers33
viewsProblem with div updating content
Well personal I have an ajax script making requests every 1 according to my database to show new content that has been published in the database but I am finding a problem that content always has a…
-
0
votes0
answers44
viewsContent outside while php
Well I have a loop while that shows all my posts on the page and for each post I have a input box to comment on the post. I need a way to put it (input) out of the while but stay in all posts. How…
-
0
votes1
answer672
viewsRemove Registration in jQuery
I would like you to click Delete, delete the mysql database record.. No re-load the page... using jquery.. Can anyone inform? Grateful
-
0
votes0
answers128
views -
0
votes1
answer264
viewsavatar with user information
It is the following people, maybe this is very basic, but how do I associate the image of an image folder for example to the user id 1 in the bank? Will user 1 have image 01 of the img folder? Would…
-
0
votes3
answers697
viewsHow to box up when logged in
Well, I created a system with $_SESSION, and would like to know how I could do for example. You have the login, the person logs into the index, and returns on the same logged in page, and you want…
-
0
votes1
answer339
viewsHow not to select records that are within a date?
I have a table in Mysql with apartment, so: id | nome | data_ja_locado 1 | ap teste | 09/08/2015, 10/08/2015, 11/08/2015 So when the user does a search he wants to find apartments that are available…
-
0
votes1
answer47
viewsVariable in SQL query
Guys, I’m trying to make a query with a variable that I’m receiving, but it’s not working. Any suggestions ? $model = $_REQUEST['model']; $customer = $_REQUEST['customer']; SELECT * FROM sistema…
-
0
votes3
answers371
viewserror while creating table with Foreign key mysql
You’re making a mistake Can't create table when creating this table in Mysql. I have no idea where problem D is: CREATE TABLE IF NOT EXISTS `tbnoticiasrel` ( `id` bigint(20) NOT NULL AUTO_INCREMENT,…
-
0
votes1
answer373
viewsHow to change link from my htaccess page
My normal url is: http://localhost/paginas/noticias.php?id=1 I wish so: http://localhost/paginas/noticias/1 id 1 is generated by php, I don’t know how to get it this way in htaccess.…
-
0
votes2
answers1028
viewsProblem with while loop in PDO
Good people I’m here with a problem in the PDO I want to do a while but did a query and in the end only I returned a value of that while I don’t know what’s going on Code $result =…
-
0
votes4
answers115
viewsHow do I not allow "<" and ">" in my Insert
Well, I have an INSERT, and I would like to make sure that if someone typed in the text something with "<" or ">" that gave error when sending. Code: $autor_id = $_POST ["autor_id"]; $texto =…
-
0
votes1
answer47
viewsQuery MYSQL with WHERE clause predominance
I have the following query (after all logic, ie the final query) SELECT * FROM cl_assistance AS CA LEFT JOIN cl_assistance_rel AS CREL ON CA.cod_assistance = CREL.rel_assistance WHERE latitude…
mysqlasked 9 years, 8 months ago lucasDotCom 727 -
0
votes2
answers54
viewsDo not show inactive product in search of products
I have a code snippet that does a search to my BD by the term, until everything correct, but I have products that are inactive and should not be caught and are appearing, the code is like this, I…
mysqlasked 9 years, 8 months ago adventistapr 5,498 -
0
votes1
answer64
viewsUnion e order by juntos
Good have in MYSQL database table chatlogs with: from,for,msg,datetime. Where are the messages exchanged and information ok, starting from this point I would like to know how to make a history of…
-
0
votes1
answer501
viewsLaravel 5 - How to use Primary key in pivot table?
I have a question that came up now. You searched the forums, and I did not find anything like it. I have this scheme in my comic: users: id name ... products: id name ... product_user: id product_id…
-
0
votes0
answers450
viewsProblem creating Foreign key in mysql
Well I have to relate 3 tables and I’m trying to create the foreign key I can create only that in php I have a INSERT for one of the tables that does not perform the insertion and accuses the…
-
0
votes1
answer36
views$Session with durability
Hello how can I complement the code below to work as follows accurate that the section is destroyed once a day or if the user creates the SESSION on 01/08/2015 if he accesses the same page with that…
-
0
votes0
answers809
viewsSecure login system php
I would like to know how you make a secure login system. Because it is difficult to get information from the user who will try to log in: Ex: echo getenv("username").'<br>'; echo…
-
0
votes1
answer332
viewsValue problem containing comma
When executing this query: mysqli_query($dbc, "insert into toons values(NULL, $toonId, '$toonName', $admin, '$dna', $bank, $money, $hp, '$inventory', $lastPlace)") I get this mistake: You have an…
-
0
votes4
answers80
viewsHow to print next line
I have the following code: <? $result = $connection -> query("SELECT * FROM testemunhos") or die($connection -> error); while($row = $result -> fetch_array(MYSQLI_ASSOC)){ ?> <div…
-
0
votes1
answer58
viewsProblem with query Join with 5 tables
Good night, I am trying to make a Join to 5 tables to fetch me the information so that it is not returning me some data. Code SELECT * FROM estabelecimentos INNER JOIN estabelecimentos_anexos ON…
-
0
votes1
answer272
viewsSearch login user record in mysql
I have a followers exchange system, where the user logs in to the panel and use his list so I created a texarea so he can put his list which is in the format email@provider:password and then save…
-
0
votes1
answer641
viewsDate Data Recovery - php + mysql
Hello, I am searching from the bank a data information in a grid with various information, I am doing so: $data = $tbdeliberacoes->getData(); date("d/m/Y", strtotime($data)); and this is my…
-
0
votes1
answer71
viewsHow to hide data in a table according to status
I have a code that searches the data in the database and prints on the screen a table. My table that appears on the user screen has the fields: Referência | Abertura |Status |Objeto Reference is an…
-
0
votes1
answer2115
viewsmysql_fetch_array() does not show all records
Hello, I’m having problems, in my database table I have 3 records, I use the code below to fetch them: public function buscarMateriaProva($codigoProva){ $query = " SELECT codigoMateria, codigoProva,…
-
0
votes1
answer364
viewsWhy does Inner Join return repeated values?
Good night, I have a query to two tables where I want the second table to return all data with the id of table 1 but only returns me a table value when there are more than one with the same id. I…
-
0
votes1
answer45
viewsProblem with checkbox
When I try to check through the database if any record exists, mark the checkbox as checked, always returns me as unchecked. <?php $result_cat = $conexao->prepare("SELECT * FROM colecoes WHERE…
-
0
votes1
answer473
viewsTrigger that feeds a table with information from another Mysql
I have a database in Mysql with Stock, Sales and Ite_sales tables. When making a sale record information in the Sales and Ite_sales tables, but I want to get information from the Stock table and…
-
0
votes2
answers189
viewsSearch for results in related tables
I have the following question, I have a ticket system to create calls and I need to do a search to bring the open calls sorted by priority order, so far so good, I need now that the field…
-
0
votes2
answers519
viewsSelect only the first record of a column
select below returns something of the type 005-A Produto A 21/AGOSTO 005-A Produto A 20/AGOSTO 005-A Produto A 21/MAIO 005-B Produto B 21/AGOSTO and I would like a registration per product equal to…
-
0
votes1
answer46
viewsCan Union (mysql) also be used in Updates?
Example : $query = "update tabela set coluna1 = 1 where id = {$id_m} union update tabela set coluna2 = 1 where id = {$id_v}";
-
0
votes1
answer21
viewsIs there any way that I can change data from different columns but leave it in one variable?
Summarizing.... Use multiple updates in one variable Type: $query = 'update..... ; update.........' Is there any way?
-
0
votes0
answers238
viewserror when querying id in Sql table
I have an error when consulting the id in a table, I am developing a system of friendship between users and the error is as follows: Pdoexception: SQLSTATE[23000]: Integrity Constraint Violation:…
-
0
votes1
answer850
viewsRun a query by clicking on the result of another query
I have the following column structure from my database: account_id, name and appearance. Imagery: http://puu.sh/gYLVL/4083073484.png I had the following code previously: <font size="3">Por…
-
0
votes1
answer522
viewsHow to reset the auto_increment value (NO TRUNCATE)?
How can I reset/reset the value of AUTO_INCREMENT in the Mysql, without the use of TRUNCATE? For in some cases it is not possible to use TRUNCATE table in some tables.…
-
0
votes1
answer31
viewsError in mysql query
I am hours away from realizing what is wrong with my query. I would like you to give me a help SELECT `recargas`.`valor_recarga` as saldo FROM `contas_pessoais` INNER JOIN `contas` ON…