| |

VerySource

 Forgot password?
 Register
Search
Author: hcpalex

Everyone, help me, I'm dying, thank you! !! !!

[Copy link]

2

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 Asia/Pacific Region

Post time: 2020-6-10 10:30:02
| Show all posts
Is it possible to consider changing the table structure of the database?
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-6-10 17:15:01
| Show all posts
There is no way to change the table structure
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-6-12 03:00:01
| Show all posts
SELECT a.id,a.username,a.name,a.ip,b.*
FROM eqs_users a
LEFT JOIN ws_users_info b on a.id=b.uid
WHERE a.uid
IN (
  SELECT uid FROM ws_cn_sell
  GROUP BY uid having count(uid)>1)
ORDER BY a.register_date DESC LIMIT 0, 20
Reply

Use magic Report

0

Threads

17

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-7-14 21:15:01
| Show all posts
SELECT COUNT(*) FROM eqs_users a LEFT JOIN ws_users_info b ON a.id=b.uid WHERE 1=1 HAVING sell_num >=10

Is this really useful? do not understand……

SELECT COUNT(*) FROM eqs_users as a,ws_users_info as b,ws_cn_sell as c WHERE a.id=b.uid asd b.sell_num >=10
I feel this will fulfill your query requirements

If pagination, use the limit

$page=20;//20 messages per page
$p=$_GET["page"];//Get the transfer parameters
$sql="select * from eqs_users as a,ws_users_info as b,ws_cn_sell as c WHERE a.id=b.uid asd b.sell_num >=10 limit {$page*($p-1)},{$page* $p}";

OK? Okay? Ugh……
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-20 20:45:01
| Show all posts
Subquery, be careful of mysql blocking
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list