Python ကျူတိုရီရယ်

Python ပင်မစာမျက်နှာ Python နိဒါန်း Python ကို စတင်လိုက်ပါ။ Python Syntax Python မှတ်ချက်များ Python Variables များ Python Data အမျိုးအစားများ Python နံပါတ်များ Python Casting Python ကြိုးများ Python Booleans Python အော်ပရေတာများ Python စာရင်းများ Python Tuples Python အစုံများ Python အဘိဓာန်များ Python If... Else Python while Loops Python For Loops Python လုပ်ဆောင်ချက်များ Python Lambda Python Arrays Python အတန်းများ/အရာဝတ္ထုများ Python Inheritance Python Iterators Python နယ်ပယ် Python Modules Python နေ့စွဲများ Python သင်္ချာ Python JSON Python RegEx Python PIP Python ကိုစမ်းကြည့်ပါ... ကလွဲရင် Python အသုံးပြုသူ ထည့်သွင်းမှု Python String Formatting

ဖိုင်ကိုင်တွယ်ခြင်း။

Python ဖိုင်ကို ကိုင်တွယ်ခြင်း။ Python ဖိုင်များကိုဖတ်ပါ။ Python ဖိုင်များကို ရေးသားခြင်း/ဖန်တီးပါ။ Python ဖိုင်များကိုဖျက်ပါ။

Python Modules

NumPy ကျူတိုရီရယ် Panda ကျင့်စဉ် Scipy ကျူတိုရီရယ်

Python Matplotlib

Matplotlib နိဒါန်း Matplotlib ကို စတင်လိုက်ပါ။ Matplotlib Pyplot Matplotlib Plotting Matplotlib အမှတ်အသားများ Matplotlib လိုင်း Matplotlib အညွှန်းများ Matplotlib Grid Matplotlib အပိုင်းခွဲများ Matplotlib ဖြန့်ကြဲခြင်း။ Matplotlib ဘားများ Matplotlib Histograms Matplotlib Pie ဇယားများ

စက်သင်ယူခြင်း။

စတင်အသုံးပြုခြင်း Mean Median Mode စံလွဲခြင်း။ ရာခိုင်နှုန်း ဒေတာဖြန့်ဝေခြင်း။ ပုံမှန်ဒေတာဖြန့်ဝေ ကွက်ကျားကွက်၊ Linear Regression Polynomial Regression Multiple Regression အတိုင်းအတာ ရထား/စမ်းသပ်မှု ဆုံးဖြတ်ချက်သစ်ပင်

Python MySQL

MySQL စတင်လိုက်ပါ။ MySQL ဒေတာဘေ့စ်ဖန်တီးပါ။ MySQL ဇယားဖန်တီးပါ။ MySQL ထည့်သွင်းခြင်း။ MySQL ကို ရွေးပါ။ MySQL ဘယ်မှာလဲ။ MySQL Order By MySQL ကိုဖျက်ပါ။ MySQL Drop Table MySQL အပ်ဒိတ် MySQL ကန့်သတ်ချက် MySQL Join

Python MongoDB

MongoDB စတင်လိုက်ပါ။ MongoDB ဒေတာဘေ့စ်ဖန်တီးပါ။ MongoDB သည် Collection ကိုဖန်တီးပါ။ MongoDB ထည့်သွင်းပါ။ MongoDB ကိုရှာပါ။ MongoDB မေးခွန်း MongoDB အမျိုးအစား MongoDB ကိုဖျက်ပါ။ MongoDB Drop Collection MongoDB အပ်ဒိတ် MongoDB ကန့်သတ်ချက်

Python အကိုးအကား

Python ခြုံငုံသုံးသပ်ချက် Python Built-in လုပ်ဆောင်ချက်များ Python String နည်းလမ်းများ Python စာရင်းနည်းလမ်းများ Python Dictionary Methods Python Tuple နည်းလမ်းများ Python သတ်မှတ်နည်းလမ်းများ Python ဖိုင်နည်းလမ်းများ Python သော့ချက်စာလုံးများ Python ခြွင်းချက်များ Python ဝေါဟာရ

Module အကိုးအကား

ကျပန်း Module တောင်းဆိုမှုများ Module Statistics Module သင်္ချာ မော်ဂျူး cMath မော်ဂျူး

Python လုပ်နည်း

စာရင်းပွားများကို ဖယ်ရှားပါ။ ကြိုးတစ်ချောင်းကို ပြောင်းပြန် နံပါတ်နှစ်ခုထည့်ပါ။

Python ဥပမာများ

Python ဥပမာများ Python Compiler Python လေ့ကျင့်ခန်းများ Python Quiz Python လက်မှတ်

Python MySQL ဘယ်မှာလဲ။


With a Filter ကိုရွေးချယ်ပါ။

ဇယားတစ်ခုမှ မှတ်တမ်းများကို ရွေးချယ်သည့်အခါ၊ "WHERE" ကြေညာချက်ကို အသုံးပြု၍ ရွေးချယ်မှုကို စစ်ထုတ်နိုင်သည်-

ဥပမာ

လိပ်စာ "Park Lane 38" ရှိသည့် မှတ်တမ်း(များ) ကို ရွေးပါ- ရလဒ်-

import mysql.connector

mydb = mysql.connector.connect(
  host="localhost",
  user="yourusername",
  password="yourpassword",
  database="mydatabase"
)

mycursor = mydb.cursor()

sql = "SELECT * FROM customers WHERE address ='Park Lane 38'"

mycursor.execute(sql)

myresult = mycursor.fetchall()

for x in myresult:
  print(x)

Wildcard ဇာတ်ကောင်များ

ပေးထားသောစာ သို့မဟုတ် စကားစုတစ်ခုဖြင့် အစ၊ ပါဝင်သော၊ သို့မဟုတ် အဆုံးရှိသော မှတ်တမ်းများကိုလည်း သင်ရွေးချယ်နိုင်သည်။

%  သင်္ကေတ အက္ခရာများကို ကိုယ်စားပြုရန်အတွက် အသုံးပြု ပါ-

ဥပမာ

လိပ်စာတွင် "လမ်း" ဟူသော စကားလုံးပါရှိသော မှတ်တမ်းများကို ရွေးပါ-

import mysql.connector

mydb = mysql.connector.connect(
  host="localhost",
  user="yourusername",
  password="yourpassword",
  database="mydatabase"
)

mycursor = mydb.cursor()

sql = "SELECT * FROM customers WHERE address LIKE '%way%'"

mycursor.execute(sql)

myresult = mycursor.fetchall()

for x in myresult:
  print(x)

SQL Injection ကိုကာကွယ်ပါ။

အသုံးပြုသူမှ query တန်ဖိုးများကို ပေးသောအခါ၊ သင်သည် တန်ဖိုးများကို ရှောင်သင့်သည်။

၎င်းသည် သင်၏ဒေတာဘေ့စ်ကို ဖျက်ဆီးရန် သို့မဟုတ် အလွဲသုံးစားလုပ်ရန် ဘုံဝဘ်ဟက်ကာနည်းပညာဖြစ်သည့် SQL ထိုးသွင်းမှုများကို တားဆီးရန်ဖြစ်သည်။

mysql.connector module တွင် query တန်ဖိုးများကို ရှောင်ရန် နည်းလမ်းများ ရှိသည်-

ဥပမာ

placholder %s method ကိုသုံး၍ query values ​​များကို ရှောင်ရန်-

import mysql.connector

mydb = mysql.connector.connect(
  host="localhost",
  user="yourusername",
  password="yourpassword",
  database="mydatabase"
)

mycursor = mydb.cursor()

sql = "SELECT * FROM customers WHERE address = %s"
adr = ("Yellow Garden 2", )

mycursor.execute(sql, adr)

myresult = mycursor.fetchall()

for x in myresult:
  print(x)