Questions tagged as 'mysql'

2
answers

How to renumber table IDs in MySQL? [duplicate]

I deleted the sales records from my sales table, and canceled sales, from my sales table. So the sales numbering got messy, like: it starts with 9, 10, 11, 14 .... How do I sort sales from # 1 and so on?     
asked by 07.01.2015 / 17:15
1
answer

Error 1118: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126

I'm having this error while adding tables to my database. Anyone help me in this situation? Because the data is already like Barracuda. The fields I am adding are of Type: Text, Varchar (20), Longblob.     
asked by 16.06.2014 / 15:17
1
answer

Problems inserting Emoji in mySQL

I'm having trouble inserting EMOJI emoticons into mySQL, it inserts "????" for each emoticon. My table is already as utf8mb4_bin how do I insert it correctly? Is it PHP?     
asked by 06.06.2014 / 18:47
1
answer

Variable in the SQL query

Well, I'm trying to query with a variable I'm getting, but it's not working. Any suggestions? $model = $_REQUEST['model']; $customer = $_REQUEST['customer']; SELECT * FROM sistema WHERE concluido <> 1 AND site='$site' AND $model='X'    ...
asked by 21.07.2015 / 20:46
1
answer

Change color of a td / td from html table according to php condition

In a table generated from data in a database, you would need to change the for certain colors of a <td></td> if the value of the ipaymentstatus field in the database is as: completed, pending, Canceled_Reversal. Code...
asked by 17.07.2015 / 02:51
1
answer

Problem with value that contains comma

When you run this query: mysqli_query($dbc, "insert into toons values(NULL, $toonId, '$toonName', $admin, '$dna', $bank, $money, $hp, '$inventory', $lastPlace)") I get this error:    You have an error in your SQL syntax; check the manua...
asked by 31.07.2015 / 21:59
2
answers

How to do a select within another select in mysql

I need to get the smallest value of a column to use as a condition in where , but I do not know how to do that. The column I need is ordering , as below: SELECT p.pro_name, p.id, f.image as foto FROM #__osrs_properties p LEFT JOIN...
asked by 08.11.2018 / 17:35
2
answers

Is it possible to use Inner Join in multiple columns of the same table in a Select?

There are 2 related tables in the database. Contributors : Events(hereyouentertrainingtimeperemployee): I need to know the total amount of training time for each industry. The Select below works, but only for column C1. I need to go...
asked by 08.11.2018 / 14:13
1
answer

MySql re-using subquery result

In mysql is there a way where I can re-use the result of a subquery inside the main query? select (select resultado from tabela limit 1) as resultado_subquery, (resultado_subquery * outra_coluna) as teste from tabela     
asked by 13.11.2018 / 12:11
2
answers

Select with reference in several tables

I have three tables: PRODUTOS , PEDIDO and ESTOQUE , and I want to list all the inventory going by order and by product, as I show below: products codigo tipo medida 3020 | unico | 3 3021 | unico...
asked by 27.11.2018 / 17:52