分享知识的快乐,尊重他人创造的知识 注册 | 登陆
浏览模式: 标准 | 列表2007年09月的文章

mysql 数字类型的 int(3)或int(1) 其中括号数字表示什么

mysql 数字类型的 int(3)或int(1) 其中括号数字表示什么.
官方有一段话:

Another extension is supported by MySQL for optionally specifying the display width of integer data types in parentheses following the base keyword for the type (for example, INT(4)). This optional display width is used to display integer values having a width less than the width specified for the column by left-padding them with spaces.

The display width does not constrain the range of values that can be stored in the column, nor the number of digits that are displayed for values having a width exceeding that specified for the column. For example, a column specified as SMALLINT(3) has the usual SMALLINT range of -32768 to 32767, and values outside the range allowed by three characters are displayed using more than three characters.

When used in conjunction with the optional extension attribute ZEROFILL, the default padding of spaces is replaced with zeros. For example, for a column declared as INT(5) ZEROFILL, a value of 4 is retrieved as 00004. Note that if you store larger values than the display width in an integer column, you may experience problems when MySQL generates temporary tables for some complicated joins, because in these cases MySQL assumes that the data fits into the original column width.

» 阅读全文

Tags: mysql, int, number type

CSS实战手册 电子版下载

 Web site design has grown up. Unlike the old days, when designers cobbled together chunky HTML, bandwidth-hogging graphics, and a prayer to make their sites look good, Cascading Style Sheets (CSS) now lets your inner designer come out and play. But CSS isn't just a tool to pretty up your site; it's a reliable method for handling all kinds of presentation--from fonts and colors to page layout. CSS: The Missing Manual clearly explains this powerful design language and how you can use it to build sparklingly new Web sites or refurbish old sites that are ready for an upgrade.<br /> <br />

» 阅读全文

Tags: css, css实战, 手册

通过数组的值得到对应的键名.

我是从js转过来学php.
在js里面没有找键名的函数,只有自己写.
 但PHP就不一样了

» 阅读全文

Tags: array, array_keys, array_search

[转载]华为之惑

“华为公司创立之初,就在家门口碰到了全球最激烈的竞争,我们不得不在市场的狭缝 中求生存;当我们走出国门拓展国际市场时,放眼一望,所能看得到的良田沃土,早已被西方公司抢占一空,只有在那些偏远、动乱、自然环境恶劣的地区,他们动 作稍慢,投入稍小,我们才有一线机会..........

» 阅读全文

Tags: 华为, 生活, 感悟

javascript的书写规范.

 好的书写规范,可以以后方便修改.共同开发.
先看一下一篇的文章:http://realazy.org/blog/2007/09/17/the-elements-of-javascript-style/

» 阅读全文

Tags: 规范, javascript

数组的合并[转一个CSDN的题目]

好久没去CSDN了,为了自己的PHP进步更快.决定去CSDN回答问题.
没想到一去就遇到我自己感觉的大问题.

» 阅读全文

Tags: 数组, php, 合并, array_unique

正则学习笔记

将新体会写一下

» 阅读全文

Tags: 正则, 笔记

英文版pdf<<正则表达式精通>>

目录

Preface
1:Introductionc to Regular Expressions
Solving Real Problems
Regular Expressions as a Language
The Filename Analogy
The Language Analogy
The Regular-Expression Frame of Mind
If You Have Some Regular-Expression Experience
Searching Text Files:Egrep
Egrep Metacharacters
Start and End of the Line
Character Classes
Matching Any Character with Dot
Alternation
Ignoring Differences in Capitalization
Word Boundaries
In a Nutshell
Optional Items
Other Quantifiers:Repetition
Parentheses and Backreferences
The Great Escape
Expanding the Foundation
Linguistic Diversification
The Goal of a Regular Expression
A Few More Examples
Regular Expression Nomenclature
Improving on the Status Quo
Summary
Personal Glimpses
3:Extended Introductory Examples
About the Examples
A Short Introductioncto Perl
Matching Text with Regular Expressions
Toward a More Real-World Example
SidecEffects of a Successful Match
Intertwined Regular Expressions
Intermission
Modifying Text with Regular Expressions
Example: FormcLetter
Example:Prettifying a Stock Price
Automated Editing
A Small Mail Utility
Adding Commas to a Number with Lookaround
Text-to-HTML Conversion
That Doubled-Word Thing
3:Overview of Regular Expression Features and Flavors
A Casual Stroll Across the Regex Land scape
The Origins of Regular Expressions
At a Glance
Care and Handling of Regular Expressions
Integrated Handling
Procedural and Object-Oriented Handling
A Search-and-Replace Example
Search and Replace in Other Languages
Care and Handling:Summary
Strings,Character Encodings,and Modes
Strings as Regular Expressions
Character-Encoding Issues
Regex Modes and Match Modes
Common Metacharacters and Features
Character Representations
……
4:The Mechanics of Expression Processing
5:Practical Regex Techniques
6:Crafting an Efficient Expression
7:Perl
8:Java
9:.NET
Index

» 阅读全文

Tags: pdf, 正则表达式

Records:912