src/com/bar/db/Music.java
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bar.db;
import java.sql.*;
/**
*DROP TABLE IF EXISTS `music`;
CREATE TABLE music (
musicid bigint(20) not null auto_increment,
musicname text,
musicurl text,
userid bigint(20) NOT NULL default '0',
PRIMARY KEY (musicid)
) TYPE=MyISAM;
* @author asus
*/
public class Music extends ExecuteDB{
private long musicid;
private String musicname;
private String musicurl;
private long userid;
private String strSql;
public Music(){
this.musicid = 0;
this.musicname="";
this.musicurl="";
this.userid=0;
this.strSql="";
}
public boolean add(){
this.strSql="insert into music";
this.strSql=this.strSql + " (musicname,musicurl,userid) ";
this.strSql=this.strSql + "values('" + this.musicname + "','" + this.musicurl + "','" + this.userid + "')";
boolean isAdd = super.exeSql(this.strSql);
return isAdd;
}
public boolean delete(String smusicid)
{
this.strSql="delete from music";
this.strSql=this.strSql + " where musicid in ("+smusicid+")";
boolean isDelete = super.exeSql(this.strSql);
return isDelete;
}
public boolean init()
{
this.strSql="select * from music";
this.strSql=this.strSql + " where musicid='" + this.musicid + "'";
try
{
ResultSet rs = super.exeQuery(this.strSql);
if (rs.next())
{
this.musicid=rs.getLong("musicid");
后面还有 79 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。