SQL 问题

WBOY
Release: 2016-06-23 13:33:08
Original
952 people have browsed it

数据库中有值:634680238578
用户输入的值:31971157310000016346802385782010

请问如何查询得到结果。


回复讨论(解决方案)

... where instr('31971157310000016346802385782010',字段)>0

$val='634680238578';
$sql=“select * from tablename where fieldname like '%$val%'”;

不好意思,看错了.....

用 like 也是一样
.... ‘31971157310000016346802385782010’ like concat('%', 字段, '%')

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template