Jump to content
php.lv forumi
ziedinjsh

nerādīt bloķētos lietotājus

Recommended Posts

Čau atkal!

 

Ir kopējais lietotāju saraksts kurā ir izņemts profils kurš ir ielogojies.

 

ir block tabula kurā ir bloķētāja lietotāja ID un nobloķētā ID kā lai uztaisa lai nerādās saraksta, ko redzu es, bloķētie lietotāji??

Share this post


Link to post
Share on other sites

Otrs, un performancei draudzīgājs risinājums, būtu «users» tabulai pievienot kolonu «blocked».

 

~~~

SELECT * FROM `users` WHERE `blocked` = 0;

UPDATE `users` SET `blocked` = 1 WHERE `id` = 1;

UPDATE `users` SET `blocked` = 1 WHERE `id` IN (1, 2, 3);

~~~

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...