FIND_IN_SET()不适用于单个值

时间:2015-11-23 06:38:01

标签: mysql

我有一个名为 class HelloAction { const FIRST = "DEMO"; public static $first = "WORLD"; function __construct($confclassname) { $this->config = $confclassname; # PHP Interpreter throws an Error for These Two Lines $this->first1 = $confclassname::$a; $this->first2 = $confclassname::$b; } function setFirst($s) { self::$first = $s; } } class action1 { const AAAA = "____Hello World____"; public static $a = "this is an apple"; public static $b = "That is an Dog"; function __construct() { $this->second = "hi, there."; } } class action2 { const AAAA = "___Yeah, Hello World____"; public static $a = "Whare You were..."; public static $b = "Awesome work"; function __construct() { } public static function action21($s) { self::$a = $s; } public function action22() { return self::$a; } } $b1 = new HelloAction('action1'); $b2 = new HelloAction('action2'); echo $b1->first1 . "\n"; echo $b1->first2 . "\n"; ?> 的表,其中有一个名为post的列,其中有逗号分隔值。当我显示相应用户的帖子时,我使用了visible_user_ids

e.g。 FIND_IN_SET()当visible_user_ids列包含逗号分隔的用户ID(例如

)时,它显示用户ID为8的post表中的所有记录
FIND_IN_SET('8','visible_user_ids')

但是当visible_user_ids列只包含一个值,即8时,它不会显示帖子表记录。

请提出解决方案。 3,5,8 8,5 8,1,12 etc. 是否适用于单一值?

0 个答案:

没有答案