Objective:
SQL injection want to learn, learn to pass. You have to understand the underlying SQL
Statement. I'll get a quick haircut here.
Body:
Set up the environment suggestion Phpsduy Fast Construction
SELECT * from Kasi
Select field name from table name
Querying all fields in a table
Results
Query the specified table name
Select Book name from Kasi
Results
SELECT * from Kasi where ID where in MySQL is a conditional expression
SELECT * from Kasi where condition
Results
Let's get a little more detailed.
SELECT * from Kasi where book name = ' Naruto '
Results
SELECT * from Kasi ORDER BY ID ASC ORDER by in MySQL for sort ASC to ascending desc to descending
SELECT * from Kasi ORDER by ID DESC
SELECT * from Kasi limit 1,3 to output the specified number of rows
Create a new field content
INSERT into Kasi () VALUES (' Stealing stars September days ', ' 5 ', ' 10RMB ', ' China ')
And then insert a bucket of broken skies.
INSERT into Kasi () VALUES (' Bucket break sky ', ' 8 ', ' 30RMB ', ' China ')
Take a look
SELECT * from Kasi
Update Record Updates
UPDATE kasi SET Book name = ' Steal star September days ', id= ' 5 ', price = ' 12RMB ', place of origin = ' China ' where id= ' 5 ' | UPDATE table name SET field name = ' new value ' WHERE clause! Here I understand that by specifying something to update such as ID
View SELECT * from Kasi ORDER by ID ASC
The final deletion
Delete from Kasi where id= ' 5 ' deletes a row of ID5 | Delete from table name where condition deleted | Clear all fields DELETE from Kasi where 1 1 represents table All
Results
Query to see
SELECT * from Kasi
has been removed-end
Well, time has gone by so fast. ~
A Song of small songs:
MySQL Injection Fast Learning basics