Home > Backend Development > PHP Tutorial > %s %t %f %i %s %d %n 在discuz数据调取时该如何用

%s %t %f %i %s %d %n 在discuz数据调取时该如何用

WBOY
Release: 2016-06-13 12:07:06
Original
1247 people have browsed it

%s %t %f %i %s %d %n 在discuz数据调取时该怎么用
discuz中有很多这样的符号,我的理解是他们是替代符号,这些符号好象是为了方便书写.
另外discuz  sql语句中有很多的参数,官方也没有给一个明确的说法,当然了源码我也只能看个半懂.
比如有时此类句子中,后面还跟一个array( );括号内还放了一些参数,不知这些参数是代表啥哟
------解决思路----------------------
你的php基础还有待提高啊...
后面的数组就是方法fetch_first的参数,array里面的值和前面sql语句中的%t,%d..之类的占位符是一一对应的
如:DB::fetch_first("SELECT * FROM %t WHERE uid=%d",array('common_member',1));
%t=pre_common_member(会默认执行DB::table加上表前缀)
%d=1(会默认执行intval)

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