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)';
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..
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
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 =..
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..