If arbitrary parameter type conversions are required, the method setObject should be used with a target SQL type.
In the following example of setting a parameter, con represents an active connection: 使用范例:
PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?"); pstmt.setBigDecimal(1, 153833.00) pstmt.setInt(2, 110592)
接口PreparedStatement接口中用到的方法 1. 方法 void setObject(int parameterIndex, Object x) API: Parameters: parameterIndex - the first parameter is 1, the second is 2, ... x - the object containing the input parameter value
2.方法int executeUpdate() API: Returns: either (1) the row count for SQL Data Manipulation Language (DML) statements or (2) 0 for SQL statements that return nothing
3.方法 ResultSet executeQuery() Returns: a ResultSet object that contains the data produced by the query; never null
ResultSetMetaData接口
ResultSetMetaData metaData =resultSet.getMetaData(); 方法: 1. String getColumnName(int column) —–>Get the designated column's name. Parameters: column - the first column is 1, the second is 2, ... Returns: column name 2. int getColumnCount()—-> Returns the number of columns in this ResultSet object.
// 多态, 在JAVA中是这样用的, 其实在PHP当中可以自然消除, 因为参数是动态的, 你传什么过来都可以, 不限制类型, 直接调用类的方法
abstract class Tiger {
public abstract function climb();
}
class XTiger extends Tiger {
public function climb()
jQuery.extend({
handleError: function( s, xhr, status, e ) {
// If a local callback was specified, fire it
if ( s.error ) {
s.error.call( s.context || s, xhr, status, e );
}
always 总是
rice 水稻,米饭
before 在...之前
live 生活,居住
usual 通常的
early 早的
begin 开始
month 月份
year 年
last 最后的
east 东方的
high 高的
far 远的
window 窗户
world 世界
than 比...更
最近使用mybatis.3.1.0时无意中碰到一个问题:
The errors below were detected when validating the file "mybatis-3-mapper.dtd" via the file "account-mapper.xml". In most cases these errors can be d