Saturday, December 08, 2012

[JavaScript]


str = 'things';
str = str.slice(0,1).toUpperCase()+str.slice(1);


if (confirm("") ) { alert("Good choice"); } else { alert(" 那你就留在原地"); }
Create an Array
An array can be created in three ways.

The following code creates an Array object called myCars:

1: Regular:

var myCars=new Array(); 
myCars[0]="Saab";       
myCars[1]="Volvo";
myCars[2]="BMW";
2: Condensed:

var myCars=new Array("Saab","Volvo","BMW");
3: Literal:

var myCars=["Saab","Volvo","BMW"];
[JQUERY] SELECTOR
Attribute Equals Selector [name="value"]

Monday, December 03, 2012

Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

FROM HERE
http://justalittlebrain.wordpress.com/2010/09/15/you-are-using-safe-update-mode-and-you-tried-to-update-a-table-without-a-where-that-uses-a-key-column/


YOU ARE USING SAFE UPDATE MODE AND YOU TRIED TO UPDATE A TABLE WITHOUT A WHERE THAT USES A KEY COLUMN

Error Code: 1175
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
Every found that kind of error when trying to update rows in mysql? It’s because you tried to update a table without a WHERE that uses a KEY column (err …).
Anyway, The quick fix is to add SET SQL_SAFE_UPDATES=0; before your update query. Here’s the example:
SET SQL_SAFE_UPDATES=0;
DELETE FROM people WHERE person_status = 'deceased';