Questions tagged as 'mysql'

3
answers

SELECT with 2 tables and same field in both

Good afternoon! In my database, I have two tables: imoveisvenda and imoveislocacao Both have the "dorm" field, which says how many dorms the house or apartment has, either for sale or lease. I want to create a SELECT...
asked by 18.12.2015 / 20:39
1
answer

Several products within an order

I'm having the following problem, I have a sales registration system, and in those sales I can add a product for each order, but how would I add multiple products for 1 order? Sales registration code: <?php ini_set('default_charset','UTF...
asked by 21.12.2015 / 18:33
1
answer

How to re-assign colunda ID 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 do I need to get? I want the column to be | ID | NOME | | 1 | Ana | | 2 | Jo...
asked by 26.12.2015 / 22:26
2
answers

Refresh page after submitting the form

<script> history.go(-2) </script> To return two pages back and in this page lists my items in the table, but when it comes back it seems that the page does not update so my new table item does not appear, so it appears I need...
asked by 29.12.2015 / 19:48
2
answers

Error in the authentication of a web system

I'm learning next to a tutorial to develop a petshop system and am getting the following Hibernate error:    Hibernate: select client0_.idClient idClient2_2_, client0_.email as email3_2_, client0_.name the_name_2_, client0_.password the passw...
asked by 04.01.2016 / 20:47
1
answer

Category query in MySQL

I'm learning MySQL, I need a help, I need to make a query that returns me a sales list by product category. ++++++++++++++++++++++++++++++++++++++++++++++ tb categoria campos: (id, categoria) dados: (12, camisas) ++++++++++++++++++++++++++++...
asked by 09.06.2016 / 23:35
1
answer

Error in query syntax in PrepareStatement

I'm getting this error message and can not find why:    You have an error in your SQL syntax; check the manual that   correspond to your MySQL server version for the right syntax to use   near '?,?,?)' at line 1 The code that returns the...
asked by 07.09.2016 / 15:08
1
answer

Importing a very large .sql file

I have a file with about 192.2 MB in size. I tried importing it through PHPMyAdmin but it complains that the file is too big. I searched the internet for a possible solution to the case, and saw that it has to be through the "source" example:...
asked by 11.11.2015 / 15:17
2
answers

MySQL Query - Count different table fields

I need to create a view in MySQL where I get the following result. Col1 | Col2 Total Tab1 | Total Tab2 I'm using UNION as follows, but the result comes as follows: col1 Page 201 Page 5699 CREATE VIEW 'dashboards' AS ( select...
asked by 16.11.2015 / 14:01
1
answer

Format JSON - PHP and MySql?

I need to mount a json as follows: [ {"SUPERMECADO 1": {"telefones": [ "1999999999","1999999991"]} }, {"SUPERMECADO 2": {"telefones": [ "1999999992","1999999993"]} } ] But currently my SQL is returning a array like...
asked by 01.05.2017 / 16:24