📄 e0c16df6c8ab001d1412e7a87039532d
字号:
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean userregister_update(String id,String qq,String post,String address) throws SQLException
{
String sql="update userregister set qq='"+qq+"',post='"+post+"',address='"+address+"' where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean user_update(String id,String username,String password,String birthday,String gander,String firstname,String nickname,String mail,String qq,String post,String address) throws SQLException
{
String sql="update userregister set username='"+username+"',userpassword='"+password+"',birthday='"+birthday+"',sex='"+gander+"',firstname='"+firstname+"',nickname='"+nickname+"',mail='"+mail+"',qq='"+qq+"',post='"+post+"',address='"+address+"' where id='"+id+"' ";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean admin_login_delete(String id) throws SQLException
{
String sql="delete from adminlogin where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean admin_booktype_delete(String id) throws SQLException
{
String sql="delete from userregister where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean admin_bookinfo_delete(String id) throws SQLException
{
String sql="delete from adminbookinfo where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean leihailong123(String id) throws SQLException
{
String sql="delete from userborrow where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean user_order_delete(String id) throws SQLException
{
String sql="delete from carduserborrow where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean user_back_delete(String id) throws SQLException
{
String sql="delete from userborrow where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean adminbookadd(String bookid,String bookname,String bookauthor,String biglocation,String smalllocation ,String bookshuliang,String bookchubanshe,String bookinprice,String bookshuoming,String filename,String uploadtime,String bookborrowprice) throws SQLException
{
String sql="insert into adminbookinfo(bookid,bookname,bookauthor,bookbiglocation,booksmalllocation,bookshuliang,bookchubanshe,bookinprice,bookshuoming,bookimage,bookintime,bookborrowprice) values('"+bookid+"','"+bookname+"','"+bookauthor+"','"+biglocation+"','"+smalllocation+"','"+bookshuliang+"','"+bookchubanshe+"','"+bookinprice+"','"+bookshuoming+"','"+filename+"','"+uploadtime+"','"+bookborrowprice+"')";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean adminbookupdate(String id ,String bookid ,String bookname,String bookauthor,String biglocation,String smalllocation,String bookshuliang,String bookchubanshe,String bookinprice,String bookshuoming,String filename,String uploadtime,String bookborrowprice) throws SQLException
{
String sql="update adminbookinfo set bookid='"+bookid+"', bookname='"+bookname+"',bookauthor='"+bookauthor+"',bookbiglocation='"+biglocation+"',booksmalllocation='"+smalllocation+"',bookshuliang='"+bookshuliang+"',bookchubanshe='"+bookchubanshe+"',bookinprice='"+bookinprice+"',bookshuoming='"+bookshuoming+"',bookimage='"+filename+"',bookintime='"+uploadtime+"',bookborrowprice='"+bookborrowprice+"' where id='"+id+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean adminbooktypeadd(String adminbooktype) throws SQLException
{
String sql="insert into adminbooktype(adminbooktype) values('"+adminbooktype+"')";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean registeradd(String username,String password,String question,String answer,String birthday,String gander,String firstname,String nickname,String mail,String qq,String post,String address,String money) throws SQLException
{
String sql="insert into userregister(username,userpassword,question,answer,birthday,sex,firstname,nickname,mail,qq,post,address,money) values('"+username+"','"+password+"','"+question+"','"+answer+"','"+birthday+"','"+gander+"','"+firstname+"','"+nickname+"','"+mail+"','"+qq+"','"+post+"','"+address+"','"+money+"')";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean money_update(String username,String select) throws SQLException
{
String sql="update userregister set money='"+select+"' where username='"+username+"'";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean order(String username,String bookid,String bookname,String booktime,String bookborrowprice) throws SQLException
{
String sql="insert into carduserborrow(cardusername,bookid,bookname,booktime,bookborrowprice) values ('"+username+"','"+bookid+"','"+bookname+"','"+booktime+"','"+bookborrowprice+"')";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
public static boolean putongborrow(String usertruename,String userid,String bookid,String bookname,String bookprice,String borrowprice,String uploadtime ) throws SQLException
{
String sql="insert into userborrow(usertruename,userid,bookid,bookname,bookprice,borrowprice,booktime) values ('"+usertruename+"','"+userid+"','"+bookid+"','"+bookname+"','"+bookprice+"','"+borrowprice+"','"+uploadtime+"')";
Database data=new Database();
Connection conn=data.getConn();
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate(sql);
if(i>0)
{
return true;
}
else
{
return false;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -