SELECT IF(pic IS NOT NULL,1,0) AS a FROM items
这样最终返回的是一个表
pic 是items表中的字段
a 是起的别名
items 是表名
如果不需要返回一个表,只需要返回一个数字,那么尝试用下面的方式
exists相当于是全表的判断 这样查询出来后...
path = "F:\pic"$prefix = "pp"def renameFile(path)serial = 1 Dir.foreach(path) do |f| fullfilename = path + "/" + f if f == "." or f == ".." elsif File.directory?(fullfilename) ....
The intent of Abstract Factory is to provide for the creation of a family of related, or dependent, objects. see pic:
Additional note is below:( reference from http://www.dofactory.com) :
AbstractFactory (ContinentF...