Answer to Question #241228 in Python for Clash coder

Question #241228
Write a PYTHON program

Create a data record in MySQL using patient meta data,
Create Json and parse it through PHP and show details in Html
Provide search option to filter the data using jQuery plugin
1
Expert's answer
2021-09-23T17:45:57-0400
import mysql.connector


mydb = mysql.connector.connect(
  host="localhost",
  user="root",
  password="12345",
  database="test"
)


query = mydb.cursor()


query.execute("CREATE TABLE patient (patient_id INT ,name VARCHAR(255), address VARCHAR(255))")
create_record =  "INSERT INTO patient (patient_id,name, address) VALUES (1, "John" "john@gmail.com")"
query.execute(create_record)
query.execute("SELECT * FROM patient")
result = query.fetchall()

import json
resultLoaded = json.loads(result)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS