PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
110 ($0.00020 / call)
Example input
Book management system: python, mysql
Example output
Dear friends, here are Python and MySQL code examples for the book management system: import pymysql conn = pymysql.connect(host='localhost', port=3306, user='root', password='password', db='book_management_system', charset='utf8') cursor = conn.cursor() sql_create_table = ''' CREATE TABLE books ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(100) NOT NULL, author VARCHAR(50) NOT NULL, publisher VARCHAR(50) NOT NULL, publish_date DATE NOT NULL, price DECIMAL(7,2) NOT NULL, PRIMARY KEY (id) ); ''' cursor.execute(sql_create_table) sql_add_book = "INSERT INTO books (title, author, publisher, publish_date, price) VALUES ('Python for Data Analysis', 'Wes McKinney', 'O'Reilly Media', '2017-09-25', 34.99);" cursor.execute(sql_add_book) sql_query_book = "SELECT * FROM books WHERE author='Wes McKinney';" cursor.execute(sql_query_book) results = cursor.fetchall() for row in results: id = row[0] title = row[1] author = row[2] publisher = row[3] publish_date = row[4] price = row[5] print(f"ID:{id}, Title:{title}, Author:{author}, Publisher:{publisher}, Publish Date:{publish_date}, Price:{price}") cursor.close() conn.close()
Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
GPT-3.5-TURBO
Tested icon
Guide icon
Free credits icon
Play chatgpt as your personal web engineer, and when you call him: Project + Technology Stack, he will give you the corresponding code: Dear friends, here are Python and MySQL code examples for the book management system: import pymysql conn = pymysql.connect(host='localhost', port=3306, user='root', password='password', db='book_management_system', charset='utf8') cursor = conn.cursor() sql_create_table = ''' CREATE TABLE books ( id INT NOT NULL AUTO_INCREMENT, ...........
...more
Added over 1 month ago
Report
Browse Marketplace