Kung sa nakikita nyo sa bottom part ng forum ay gumagamit tayo ng MySQL kung san ginagamit ito for database. Ang MySQL ay isang open source database na maari mong gamitin para sa personal projects, business at iba pa.
Alam ko ang ilan sa inyo alam na ito pero ngayon mag bibigay ako ng basic knowledge regarding sa MySQL
If mag run kayo ng mysql ang unang makikita nyong panel na mag prompt ay ito para ma access ang database need mo start ang Apache at MySQL
Pumunta sa iyong web browser at i-type “localhost” and ito ang mag appear then click phpMyAdmin
Mag direct sya sa MySQL page kung saan ma access mo lahat ng database at pwede ka ding gumawa. Also you can import and export ng database
Para gumawa ng database click lick new > and type your database name at may ginawa na nga akong isa.
Also you can manually type sa SQL panel to create a database
create database db_demo2
Sabihin nating naka gawa na kayo ng database at ngayon ipapakita ko paano gumagana ang log in feature sa forum. Gumawa na ako ng table para sa users para ma store ang username at password.
Primary serves as the uniqueness of the table. Para madaling maintindihan. E.g ID number.
Also, you can increment the ID with the command na AUTO_INCREMENT
create table tbl_accounts(
account_id int(10) AUTO_INCREMENT
);
Result:
id
1 Peanuts1
2 Peanuts1
3 Peanuts1
So paano to gumagana, pag ang user nag lagay ng data tulad ng username at password vini-verify ito ni database if same ba ang output at naka direct kay developer if saan nya ito direct pero sa case natin sa forum direkta tayo sa home page ng bitcointalk
I made this on draw.io but now new domain
https://app.diagrams.net/
Ito ang ibat-ibang basic commands para sa MySQL Database.
Legends
* - means "all"/ lahat data or information
SELECT COMMAND – ginagamit para makita ng specific na data na gusto mo
SELECT * FROM [table name]
Syntax:
Output:
WHERE COMMAND – ginagamit para makita ang specific na data pero may condition.
SELECT [column name] FROM [table name] WHERE [condition]
Syntax:
Output:
LOGICAL OPERATORS COMMANDAND - SELECT [column name] FROM [table name] WHERE [condition] AND [condition]
OR - SELECT [column name] FROM [table name] WHERE [condition] OR[condition]
NOT - SELECT [column name] FROM [table name] WHERE [condition] NOT IN [condition]
LIKE COMMAND - LIKE command is commonly used kung may gusto kang makita na similar letter or word. Madalas to ginagamit sa search features.
Note :% - used for looking a data and neglect the number of the character after the letter chosen.
_ - used for a single character
SELECT [column name] FROM [table name] WHERE [condition] LIKE [pattern]
Syntax (%):
Output:
Syntax (_):
Output:
INSERT COMMAND - used if you want to insert a data
INSERT INTO [table name] (column name) VALUES (values1)
Syntax:
Output:
So ito may challenge ako para sa lahat open ito pero ang mga member rank below lang ang makaka receive ng merits para nadin makatulong sa kanila mag pa rank up 1:1 lang pag distribute ibig sabihin pag nanalo na is di na pwede sumali (still depends sa magiging takbo ng thread.) So mag bibigay ako ng syntax at gagawin lang ay dapat mabigay ang dapat ipalabas na output.
CHALLENGE #1SELECT * FROM tbl_accounts WHERE account_id = 2
SELECT account_password FROM tbl_accounts WHERE account_username LIKE '%c%'
SELECT account_password FROM tbl_accounts WHERE account_password LIKE '%n'
SELECT account_username FROM tbl_accounts WHERE account_username LIKE '%a%'
SELECT account_password FROM tbl_accounts WHERE account_password LIKE '%2'
SELECT account_username FROM tbl_accounts WHERE account_username LIKE '%1'
Every time a member answered the given question a new set of question/query/command will be drop on this thread.
You can use these for more information
https://www.mysqltutorial.org/mysql-cheat-sheet.aspx
https://www.javatpoint.com/mysql-commands-cheat-sheet
https://www.w3schools.com/sql/default.asp