src/com/bar/db/Goodinfo.java

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bar.db;

import java.sql.*;

/**
 * 对应的数据库表goodinfo
 * DROP TABLE IF EXISTS `goodinfo`;
 * CREATE TABLE goodinfo (
 * goodinfoid bigint(20) NOT NULL auto_increment,
 * goodinfoname varchar(100) default NULL,
 * company varchar(100) default NULL,
 * addr varchar(50) default NULL,
 * price float(20,3) default NULL,
 * picUrl varchar(30) default NULL,
 * intro mediumtext,
 * num varchar(100) default NULL,
 * createtime timestamp   NOT   NULL   default   CURRENT_TIMESTAMP,
 *PRIMARY KEY  (goodinfoid),
 *UNIQUE KEY goodinfoid (goodinfoid)
 *) TYPE=MyISAM;
 * 
 **/
public class Goodinfo extends ExecuteDB {
        //定义类成员变量
	private long goodinfoid;
	private String goodinfoname;
	private String company;
	private String addr;
	private float price;
	private String picurl;
	private String intro;
	private int num;
	private String strSql;
public Goodinfo()
{
    this.goodinfoid = 0;
    this.goodinfoname ="";
    this.company = "";
    this.addr = "";
    this.price =0;
    this.picurl = "pic/0.jpg";
    this.intro = "";
    this.num =0;
    this.strSql = "";
}
//向goodinfo中添加一条记录
public boolean add()
{
    this.strSql = "insert into goodinfo";
    this.strSql = this.strSql + "(goodinfoname,company,addr,price,picurl,intro,num)";
    this.strSql = this.strSql + "values ('"+ this.goodinfoname +"','"+ this.company +"','"+ this.addr +"','"+ this.price +"','"+ this.picurl +"','"+ this.intro +"','"+ this.num +"')";

    boolean isAdd = super.exeSql(this.strSql);
    return isAdd;
}
后面还有 161 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。