How can i repair my tables?

|
Mangesh Panchal 2020-07-17 10:14:51
Wait
Mangesh Panchal 2020-07-17 10:17:33
Mangesh Panchal 2020-07-17 10:14:21
I need in select query

mysql_en-4496.jpg

Mangesh Panchal 2020-07-17 10:18:29
In this it sr has to come by 1 if Asin are getting changed in sequence
MasterZiv 2020-07-17 10:18:49
Mangesh Panchal 2020-07-17 10:17:33

Don’t do like this, ever.
Don’t use variables in a quiery

Mangesh Panchal 2020-07-17 10:18:56
Now it’s coming in sequence 1,2,3,4 etc
piterden 2020-07-17 10:19:19
Mangesh Panchal 2020-07-17 10:18:56
Now it’s coming in sequence 1,2,3,4 etc

No I can’t help. Sorry

Mangesh Panchal 2020-07-17 10:19:35
I want in 1,2,1,2 where Asin are getting changed
Mangesh Panchal 2020-07-17 10:19:50
piterden 2020-07-17 10:19:19
No I can’t help. Sorry

Okay thanks

MasterZiv 2020-07-17 10:21:11
Mangesh Panchal 2020-07-17 10:17:33

Also this query is missing join conditions on all tables, it’s completely wrong

Mangesh Panchal 2020-07-17 10:21:39
It’s single table source
MasterZiv 2020-07-17 10:21:45
Mangesh Panchal 2020-07-17 10:19:35
I want in 1,2,1,2 where Asin are getting changed

Why at all do you need this field?

Mangesh Panchal 2020-07-17 10:22:17
For Some purpose
piterden 2020-07-17 10:23:04
Mangesh Panchal 2020-07-17 10:22:17
For Some purpose

So do something

MasterZiv 2020-07-17 10:23:13
Mangesh Panchal 2020-07-17 10:17:33

Normally this is done with window functions and something like RANK()

MasterZiv 2020-07-17 10:32:36
Mangesh Panchal 2020-07-17 10:17:33

https://dev.mysql.com/doc/refman/8.0/en/window-functions.html

lionel_lolly 2020-07-20 15:10:35
Hello. Could someone explain the functioning of the highlighted text. Is the word ‘variables’ a keyword?

select Salary, DepartmentId, @row := IF(DepartmentId=@did, @row + 1,1) as Rank , @did:=DepartmentId
from (
select distinct Salary, DepartmentId
from Employee
order by DepartmentId, Salary desc
) ordered, (select @row:=0, @did:=0) variables

R J 2020-07-20 15:15:28
lionel_lolly 2020-07-20 15:10:35
Hello. Could someone explain the functioning of the highlighted text. Is the word ‘variables’ a keyword?

select Salary, DepartmentId, @row := IF(DepartmentId=@did, @row + 1,1) as Rank , @did:=DepartmentId
from (
select distinct Salary, DepartmentId
from Employee
order by DepartmentId, Salary desc
) ordered, (select @row:=0, @did:=0) variables

Which version you are using ?

R J 2020-07-20 15:20:01
mysql_en-4531.jpg

R J 2020-07-20 15:21:19
MySQL Administration
Here You will be able to learn all about MySQL Administration. Note: This channel is created only for leaning purpose
https://t.me/mysqladministration

MySQL AdministrationTelegram
Here You will be able to learn all about MySQL Administration. Note: This channel is created only for learning purpose
lionel_lolly 2020-07-20 15:21:55
R J 2020-07-20 15:15:28
Which version you are using ?

8.0

R J 2020-07-20 15:22:17
R J 2020-07-20 15:20:01

Remove row variable

lionel_lolly 2020-07-20 15:22:57
Is it a looping statement
lionel_lolly 2020-07-20 15:23:39
Defined at the bottom. And it is satisfied until the r has attained a specific value?
R J 2020-07-20 15:27:18
You do alternative option use ROW_NUMBER() WINDOW FUNCTION
R J 2020-07-20 15:28:08
mysql_en-4538.jpg
See in this image num and sr_no are same.
acromegale 2020-07-20 15:57:24
lionel_lolly 2020-07-20 15:10:35
Hello. Could someone explain the functioning of the highlighted text. Is the word ‘variables’ a keyword?

select Salary, DepartmentId, @row := IF(DepartmentId=@did, @row + 1,1) as Rank , @did:=DepartmentId
from (
select distinct Salary, DepartmentId
from Employee
order by DepartmentId, Salary desc
) ordered, (select @row:=0, @did:=0) variables

https://www.xaprb.com/blog/2006/12/15/advanced-mysql-user-variable-techniques/

MasterZiv 2020-07-20 21:50:47
lionel_lolly 2020-07-20 15:10:35
Hello. Could someone explain the functioning of the highlighted text. Is the word ‘variables’ a keyword?

select Salary, DepartmentId, @row := IF(DepartmentId=@did, @row + 1,1) as Rank , @did:=DepartmentId
from (
select distinct Salary, DepartmentId
from Employee
order by DepartmentId, Salary desc
) ordered, (select @row:=0, @did:=0) variables

Don’t ever use things like this, don’t use variables in a quiery other way then as parameters.

MasterZiv 2020-07-20 21:53:08
acromegale 2020-07-20 15:57:24
https://www.xaprb.com/blog/2006/12/15/advanced-mysql-user-variable-techniques/

These are techniques you should never use…

acromegale 2020-07-20 21:56:42
in some cases prior to mysql 8 is useful things, after the mysql 8 with window functions and other stuff they become useless
ranasharif 2020-07-22 09:29:40
mysql_en-4563.jpg
Hi guys

I have face an error on xampp MySQL

12:27:29 PM [mysql] Error: MySQL shutdown unexpectedly.
12:27:29 PM [mysql] This may be due to a blocked port, missing dependencies,
12:27:29 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:27:29 PM [mysql] Press the Logs button to view error logs and check
12:27:29 PM [mysql] the Windows Event Viewer for more clues
12:27:29 PM [mysql] If you need more help, copy and post this
12:27:29 PM [mysql] entire log window on the forums

Please help me

smlkw 2020-07-22 09:51:56
unknown storage engine ‘innodb’
smlkw 2020-07-22 09:51:57
When i check or repare table show me this error again
smlkw 2020-07-22 09:51:57
How can i repair my tables ?
smlkw 2020-07-22 09:51:57
Its happen when the datacenter electricity is gone
smlkw 2020-07-22 09:51:57
Its my error message
MasterZiv 2020-07-22 13:03:07
ranasharif 2020-07-22 09:29:40
Hi guys

I have face an error on xampp MySQL

12:27:29 PM [mysql] Error: MySQL shutdown unexpectedly.
12:27:29 PM [mysql] This may be due to a blocked port, missing dependencies,
12:27:29 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:27:29 PM [mysql] Press the Logs button to view error logs and check
12:27:29 PM [mysql] the Windows Event Viewer for more clues
12:27:29 PM [mysql] If you need more help, copy and post this
12:27:29 PM [mysql] entire log window on the forums

Please help me

What happened then, when you pressed this “Logs” button ?

MasterZiv 2020-07-22 13:04:13
smlkw 2020-07-22 09:51:56
unknown storage engine ‘innodb’

This is not necessarily an error. You maybe don’t use Inno at all

cr7abcdf 2020-07-22 22:40:47
Can you help me to solve this please ?
cr7abcdf 2020-07-22 22:40:59
mysql_en-4576.jpg

piterden 2020-07-22 23:04:25
cr7abcdf 2020-07-22 22:40:59

No. You should do it yourself

MasterZiv 2020-07-22 23:45:37
cr7abcdf 2020-07-22 22:40:59

Stupid task, dude, no need to solve it.

ranasharif 2020-07-23 02:29:39
MasterZiv 2020-07-22 13:04:13
This is not necessarily an error. You maybe don’t use Inno at all

I have started my xampp control panel to do practice but MySQL wasn’t start when I went it.

And I want know how can I recover my exist database if don’t create any backup before the MySQL disaster.

Thanks in advance.

piterden 2020-07-23 02:55:18
ranasharif 2020-07-23 02:29:39
I have started my xampp control panel to do practice but MySQL wasn’t start when I went it.

And I want know how can I recover my exist database if don’t create any backup before the MySQL disaster.

Thanks in advance.

So what do you have? Where from you are going to recover your data?

piterden 2020-07-23 02:57:30
ranasharif 2020-07-23 02:29:39
I have started my xampp control panel to do practice but MySQL wasn’t start when I went it.

And I want know how can I recover my exist database if don’t create any backup before the MySQL disaster.

Thanks in advance.

About broken start: check your logs. There should be a reason of crash

ranasharif 2020-07-23 02:57:56
piterden 2020-07-23 02:55:18
So what do you have? Where from you are going to recover your data?

I have location of MySQL folder which create by xampp installation path.

piterden 2020-07-23 02:58:25
ranasharif 2020-07-23 02:57:56
I have location of MySQL folder which create by xampp installation path.

And what do you want to recover?

ranasharif 2020-07-23 02:59:08
piterden 2020-07-23 02:57:30
About broken start: check your logs. There should be a reason of crash

Ok, I will do.

piterden 2020-07-23 02:59:43
Generally windows is not the best choice if you want to develop software. IMHO
piterden 2020-07-23 03:00:42
Windows is good for gaming and for low skilled users
ranasharif 2020-07-23 03:01:48
piterden 2020-07-23 02:59:43
Generally windows is not the best choice if you want to develop software. IMHO

What you i need use to develop software?
iOS or Linux based OS?

|