Can i use GROUP BY in mysql query?

|
2019-12-16 21:08:52
I can share my code
I must need to complete in 2 days otherwise they can fire me
2019-12-16 21:09:12
rohit267 2019-12-16 21:08:46
bro store the time in database

He won’t allow it

rohit267 2019-12-16 21:09:39
2019-12-16 21:09:12
He won’t allow it

wtf man, resign that job

rohit267 2019-12-16 21:10:16
login depends on you, store info whatsoever you want
rohit267 2019-12-16 21:10:32
logic*
2019-12-16 21:10:33
rohit267 2019-12-16 21:09:39
wtf man, resign that job

I’m in probation time.
And can’t even resign on my own
Because of bond

2019-12-16 21:11:56
rohit267 2019-12-16 21:10:16
login depends on you, store info whatsoever you want

I’m stucked at showing result
After inserting the quiz result
How much questions user attended
How much correct
And how much wrong

If correct then 10 point plus

2019-12-16 21:12:05
2019-12-16 21:11:56
I’m stucked at showing result
After inserting the quiz result
How much questions user attended
How much correct
And how much wrong

If correct then 10 point plus

This is where I stuck

rohit267 2019-12-16 21:13:06
2019-12-16 21:11:56
I’m stucked at showing result
After inserting the quiz result
How much questions user attended
How much correct
And how much wrong

If correct then 10 point plus

simple logic, store the answer in one db, compare it with all the answers submitted, show the data

rohit267 2019-12-16 21:13:20
what’s the big deal in it
2019-12-16 21:14:53
Not all data man
If user id 3 has given 5 questions then
Only that 5 questions would be shown
2019-12-16 21:15:04
2019-12-16 21:14:53
Not all data man
If user id 3 has given 5 questions then
Only that 5 questions would be shown

For that

2019-12-16 21:15:15
Can i use GROUP BY in mysql query??
rohit267 2019-12-16 21:15:37
2019-12-16 21:15:15
Can i use GROUP BY in mysql query??

there is something called where clause in sql

2019-12-16 21:16:14
rohit267 2019-12-16 21:15:37
there is something called where clause in sql

It should be dynamic

rohit267 2019-12-16 21:16:52
2019-12-16 21:16:14
It should be dynamic

and what do you mean by dynamic?

2019-12-16 21:17:42
If I use where clause
Then obviously i have to put something like
Where user_id = 5
2019-12-16 21:17:57
So result of 5th user will be there
2019-12-16 21:17:59
Right?
rohit267 2019-12-16 21:17:59
2019-12-16 21:17:42
If I use where clause
Then obviously i have to put something like
Where user_id = 5

yeah, that’s the use of it

2019-12-16 21:18:17
But every different time
Different user’s info i need
2019-12-16 21:18:19
For that?
rohit267 2019-12-16 21:18:40
show the result who is logged in?
2019-12-16 21:18:40
2019-12-16 21:17:42
If I use where clause
Then obviously i have to put something like
Where user_id = 5

Instead of 5 what should i writr

2019-12-16 21:18:46
rohit267 2019-12-16 21:18:40
show the result who is logged in?

Yes

2019-12-16 21:18:51
2019-12-16 21:18:40
Instead of 5 what should i writr

Write*

rohit267 2019-12-16 21:19:52
2019-12-16 21:18:51
Write*

get the user id from $_SESSIONS[ ] variable

Djjani 2019-12-16 21:20:02
Right
rohit267 2019-12-16 21:20:18
if it is stored in session variable
2019-12-16 21:20:31
rohit267 2019-12-16 21:20:18
if it is stored in session variable

Yes
User id is in session

rohit267 2019-12-16 21:20:50
2019-12-16 21:20:31
Yes
User id is in session

the get that

rohit267 2019-12-16 21:20:55
then*
2019-12-16 21:21:09
Oky
I’ll try tomorrow
rohit267 2019-12-16 21:21:29
2019-12-16 21:21:09
Oky
I’ll try tomorrow

why tomorrow, try now

rohit267 2019-12-16 21:21:52
if you want it, get it now, don’t delay it
2019-12-16 21:21:58
I just came from office
Did 12 hours job today
So I’m tired
rohit267 2019-12-16 21:22:20
hah, you have only 2 days
rohit267 2019-12-16 21:22:37
time is running
2019-12-16 21:23:12
It is but i need some rest too.
With headache i can’t do it
rohit267 2019-12-16 21:24:03
2019-12-16 21:23:12
It is but i need some rest too.
With headache i can’t do it

struggle man, this what makes a man successful

2019-12-16 21:24:49
Yes right brother
2019-12-16 21:25:03
But i also forgot to backup my today’s code for practice
2019-12-16 21:25:54
Thanks a lot for help @rohit267 ✌️🏻
2019-12-16 21:25:58
Appreciate.
rohit267 2019-12-16 21:26:34
2019-12-16 21:25:54
Thanks a lot for help @rohit267 ✌️🏻

work hard, never stop

2019-12-16 21:26:51
I will.
IlNoNamell 2019-12-16 21:39:00
2019-12-16 21:05:15
Not even cookies

Firebase?

raj_eswar 2019-12-17 05:08:08
2019-12-16 21:09:12
He won’t allow it

Just use that ID in Session and update the table with
Question ID and option user selected

Like
QID UID ANS
1 1001 4
4 1001 1

AT AFTER SUBMITTING THE TEST JUST CALCULATE THE RESULT

HOPE THIS SORTS YOU OUT WITHOUT USING ANY OTHER STORAGE

2019-12-17 05:35:22
raj_eswar 2019-12-17 05:08:08
Just use that ID in Session and update the table with
Question ID and option user selected

Like
QID UID ANS
1 1001 4
4 1001 1

AT AFTER SUBMITTING THE TEST JUST CALCULATE THE RESULT

HOPE THIS SORTS YOU OUT WITHOUT USING ANY OTHER STORAGE

I’m getting only last question details user enters

2019-12-17 05:36:36
Like
UserID questions ID userANS
1. 1. animal
1. 2. Bird
1. 3. Animal

So I’m getting only last result

|