Home  >  Article  >  Database  >  MySql in的参数变量_MySQL

MySql in的参数变量_MySQL

WBOY
WBOYOriginal
2016-06-01 13:39:211951browse

bitsCN.com
MySql in的参数变量 Mysql :Sql代码  select appid  from mem_apps where appid in (?)   如果?=25,3 那么此语句的结果只有一条,形如下面的语句:   select appid  from mem_apps where appid in ('25,3')     要得到多条记录 ,可以采用下面的写法:    select appid  from mem_apps where INSTR(CONCAT(',',?,','),CONCAT(',',appid,','))>0   类似于 select appid  from mem_apps where appid in ('25','3')  bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn