⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logoffmodule.java

📁 文件共享虚拟社区,可以实现上传下载聊天等多种信息交互.
💻 JAVA
字号:
/*
 * Created on 2005-9-8
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package fsc.server.modules;

/**
 * @author chenhao
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
import fsc.models.*;
import java.util.Date;
import java.sql.*;


public class LogoffModule {
	
	public static boolean logoff(String userToLogoff)
	{
		Connection conn=null;
		try {
			conn = DatabaseModule.getConnection();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		Statement st=null;
	try
		{
		String sqlLogoff="update user_info set status=0 where username = "+userToLogoff;
		st= conn.createStatement(); // = conn.prepareCall(sqlLogoff);
		
		st.executeQuery(sqlLogoff);
		st.close();
		}catch(SQLException sqle)
		{
			sqle.printStackTrace();
		}

		st=null;
		
		return true;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -