October 14th, 2008

SQL and Criteria Object Syntax

No Comments php 浏览量:470
SQL Criteria
WHERE column = value ->add(column, value);
WHERE column <> value ->add(column, value, Criteria::NOT_EQUAL);
Other Comparison Operators
> , < Criteria::GREATER_THAN, Criteria::LESS_THAN
>=, <= Criteria::GREATER_EQUAL, Criteria::LESS_EQUAL
IS NULL, IS NOT NULL Criteria::ISNULL, Criteria::ISNOTNULL
LIKE, ILIKE Criteria::LIKE, Criteria::ILIKE
IN, NOT IN Criteria::IN, Criteria::NOT_IN
Other SQL Keywords
ORDER BY column ASC ->addAscendingOrderByColumn(column);
ORDER BY column DESC ->addDescendingOrderByColumn(column);
LIMIT limit ->setLimit(limit)
OFFSET offset ->setOffset(offset)
FROM table1, table2 WHERE table1.col1 = table2.col2 ->addJoin(col1, col2)
FROM table1 LEFT JOIN table2 ON table1.col1 = table2.col2 ->addJoin(col1, col2, Criteria::LEFT_JOIN)
FROM table1 RIGHT JOIN table2 ON table1.col1 = table2.col2 ->addJoin(col1, col2, Criteria::RIGHT_JOIN)

Tags:, .

October 14th, 2008

VSS常犯错误(转载)

No Comments php 浏览量:435

    VSS使用的比较少,网上看到的,记录下!

1、从服务器上对需要的文件”get latest version”,取出了最新版本,别人说那是可执行版本,我却无法正常编译?

原因:

出现这种情况,极大可能是你的本地保留了服务器上已经删除的旧文件,当你从服务器取最新版本的时候,系统只对本地与服务器上的同名文件进行了更新,没有对本地无用的垃圾文件进行删除。旧的垃圾文件保留在同一个文件夹中,出现服务器最新文件与本地垃圾文件并存的现象,造成系统无法编译成功。

解决办法:

如果可以确定服务器的文件和本地工作夹的文件个数一致,可以直接使用“get latest version”从服务器取得最新版本文件进行使用;

如果无法确定服务器的文件和本地工作夹的文件个数是否一致,则先将本地工作夹改名,另外建立一个与服务器同名的文件夹,再使用“get latest version”从服务器取得最新版本文件,经过使用确保服务器为最新可执行版本后,再将原来存放于本地改名后的文件夹删除。

阅读更多»

Tags:.

October 13th, 2008

apache开启rewrite功能

No Comments 日记 浏览量:458

打开httpd.conf,把下面这行前面的#去掉。

1
#LoadModule rewrite_module modules/mod_rewrite.so

再修改

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<directory "/usr/local/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#opt...
# for more information.
#
Options Indexes FollowSymLinks
 
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
 
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
 
</directory>

将AllowOverride None改为AllowOverride All
重启Apache,搞定!

Tags:, .

October 6th, 2008

symfony,没有找到php_mbstring.dll

No Comments php 浏览量:669

    在安装好symfony框架后,执行symfony命令时,提示“没有找到php_mbstring.dll”的解决方法是:将php.ini中的扩展部分,把extension=php_mbstring.dll移到extension=php_exif.dll的前面即可。

Tags:, .

September 9th, 2008

回家了

No Comments 日记 浏览量:1045

    我准备回家了,9月11号晚上的飞机,准备回去耍一个月,到10月份的时候再回来,这一个月博客应该不会有更新了。谢谢大家来访问我的博客!

Tags:.