mysql

package
v0.0.0-...-097943f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable(db *sql.DB, tableName string) error

CreateTable -

func DeleteByID

func DeleteByID(db *sql.DB, tableName string, id int) error

DeleteByID delete by id

func InsertBanner

func InsertBanner(db *sql.DB, tableName string, name string, imagePath string, eventPath string, startDate time.Time, endDate time.Time) (int, error)

InsertBanner return id

Types

type Banner struct {
	BannerID  int
	Name      string
	ImagePath string
	EventPath string
	StartDate string
	EndDate   string
}

Banner -

func InfoByID

func InfoByID(db *sql.DB, tableName string, id int) (*Banner, error)

InfoByID squery by id

func LisitValidBannerByUnixDate

func LisitValidBannerByUnixDate(db *sql.DB, tableName string, unixtime int64) ([]*Banner, error)

LisitValidBannerByUnixDate return banner list which have valid date

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL