Web Programming 🌏/Database πŸ‘©πŸ»‍🌾

Web Programming 🌏/Database πŸ‘©πŸ»‍🌾

Postgresql SELECT & DELETE

This is the SELECT & DELETE commands in postgresql. Show the list of tables and owner. \d See the data of table. SELECT * FROM (table name); Delete a row with condition. DELETE FROM (schema).(table name) WHERE (table name).(column) = '(value)';

Web Programming 🌏/Database πŸ‘©πŸ»‍🌾

Login and Sign up System (PHP, SQL)

I made login and sign up page using PHP and MySQL. I skip the entire html code this time. Here is the method to pass the data to php files. Let's take a look at Sign up system first. Sign up I checked the email and password confirm first. For connecting this php file to our database we use the code: require_once("config.php"); So, we call the config.php for connecting current php file to databas..

Web Programming 🌏/Database πŸ‘©πŸ»‍🌾

Ubuntu Server, postgresql

Check the ubuntu server address and should have "~.pem" file Move to the library have .pem file Using file to enter Ubuntu server hosting on AWS. ssh -i "~.pem" ubuntu@(IP address) Enter Postgresql sudo -u (user) psql See the table [(user)=# \d Also, if you need to revise specific folder and using git. You need to move to the library. cd /var/www/html/ sudo git pull

Web Programming 🌏/Database πŸ‘©πŸ»‍🌾

PHP + SQL

Today, I learned that how to work PHP with SQL. This is the algorithms: Connect to the database. Handle connection errors. Execute the SQL query. Process the results. Free resources and close connection. PDO: PHP data Objects $connectionString = "mysql:host=localhost; dbname=bookcrm"; $user = "testuser"; $pass = "mypassword"; $pdo = new PDO($connectionString, $user, $pass); Normal MySQL: $host =..

Web Programming 🌏/Database πŸ‘©πŸ»‍🌾

Basic SQL

Today, I learned SQL. SQL: A table is the principal unit of storage in database. It is a two-dimensional container for data that consists of records (rows); each record has the same number of columns. These columns are called fields, which contain the actual data. Each table will have a primary key -- a field (or sometimes combination of fields) that is used to uniquely identify each record in a..

Web Programming 🌏/Database πŸ‘©πŸ»‍🌾

MySQL Command

User Search at root (λ£¨νŠΈμ—μ„œ μ‚¬μš©μž 쑰회) USE mysql; SELECT host, user FROM user; Give Privileges at root (λ£¨νŠΈμ—μ„œ μ‚¬μš©μž κΆŒν•œ λΆ€μ—¬) GRANT ALL PRIVILEGES on testdb.* TO ‘testuser’@‘localhost’; Check User (ν˜„μž¬ μ‚¬μš©μžν™•μΈ) SELECT USER(); Check current DB (ν˜„μž¬ DB 확인) SELECT DATABASE(); Check the data of sepecific table (νŠΉμ • TABLE 데이터 확인) SELECT * from (name of table); Check column (Column 확인) EXPLAIN (name of table); OR DES..

KB0129
'Web Programming 🌏/Database πŸ‘©πŸ»‍🌾' μΉ΄ν…Œκ³ λ¦¬μ˜ κΈ€ λͺ©λ‘