Skip to content

Instantly share code, notes, and snippets.

View AbudiMutamba's full-sized avatar
💭
Kyendi Kyendi

Abudi AbudiMutamba

💭
Kyendi Kyendi
View GitHub Profile
@AbudiMutamba
AbudiMutamba / introduction to SQL
Created June 2, 2021 08:52
My First SQL languge commands during the 1st Solver cohort at Ablestate creativities
#SELECT id, name FROM demo;
#INSERT INTO demo VALUES('7','David','Software Developer');
#SELECT * FROM demo;
#INSERT INto demo(name, hint) VALUES ('Uganda', 'The best country on the planet');
#UPDATE demo SET name = 'kenya' WHERE id = 9;
#DELETE FROM demo WHERE name = 'kenya';
#show DATABASES;
#USE db78196;
#SHOW TABLES;
@AbudiMutamba
AbudiMutamba / bascis
Last active June 3, 2021 09:48
Retriving data in SQL
-- Retrieving a specific number of rows;
-- SELECT * FROM demo LIMIT 3;
-- Retrieeving start after , number of rows
-- SELECT * FROM demo LIMIT 3,3;
-- Retrive while odering by id comuln in Ascending
-- SELECT * FROM demo ORDER BY (id) ASC;
-- Retrive while odering by id comuln in Descending
-- SELECT * FROM demo ORDER BY (id) DESC;
-- Therefore the ordering clause in my sql and mariadb syntax is ORDER BY(column name)
-- IFi you don't specify the DESC or ASc , the default is Ascending order;
-- SELECT * FROM demo;
-- Adding the unique constraint to specific column in the table using Alter clause
-- ALTER TABLE demo
-- ADD UNIQUE (name);
-- ALTER TABLE demo
-- DROP INDEX name;
@AbudiMutamba
AbudiMutamba / Setting up databases
Last active December 14, 2022 13:50
wordpress websitecopy
//Setting up database for WordPress in the a shared hosting enviroment
There are two scernarios:
1. When creating a brand new WordPress website using an app install on your server.
Don't need you to woe=rry because the WordPress installer in the panel will handle the creation of the database.
*Installers
- Installation
- Softacuulous
- Stock installer
/*CREATe TABLE students (
id int(20) NOT NULL,
name VARCHAR(200),
PRIMARY KEY (id)
);*/
/*INSERT INTO students(id,name)
VALUES
(1,'David'),
(2,'James'),
@AbudiMutamba
AbudiMutamba / SQL session 5
Created June 11, 2021 08:17
our second online sessionl of solver course
/*CREATe TABLE students (
id int(20) NOT NULL,
name VARCHAR(200),
PRIMARY KEY (id)
*/
/*CREATE TABLE results (
id int(20) AUTO_INCREMENT,
subject VARCHAR(100) NOT NULL,
marks INT(3),
@AbudiMutamba
AbudiMutamba / Activite elementor pro Procedure
Last active January 22, 2023 18:15
how to activite elementor pro manually
login into wordpress
Appearance and add theme "wp canvas"
plugins
search Elementor and install it
install Elementor pro
Elementor then license
In tab add &mode=manually
Add license number
@AbudiMutamba
AbudiMutamba / SQL session 7
Last active June 15, 2021 12:19
how to use php admin on xxamp
/*CREATE DATABASE ablestate;
CREATE TABLE student(
id INT AUTO_INCREMENT NOT NULL,
first_name VARCHAR(11)NOT NULL,
last_name VARCHAR(11),
dob date,
gender VARCHAR(2) DEFAULT 'M',
PRIMARY KEY (id)
);
@AbudiMutamba
AbudiMutamba / SQL session 8
Created June 16, 2021 13:30
introducation to joins
SELECT * FROM `students`
SELECT * FROM `students`
SELECT * FROM `students`
SELECT * FROM `students`
SELECT * FROM `students`
INSERT INTO students(first_name,last_name,dob,gender) VALUES ('Charles','Kasasiira','1999-04-12','male'),('David','Anyiiru','1999-05-12','male'),('Daniel','Awiiyo','1996-06-13','male'),('David','Wampamba','1990-12-12','male')
SELECT * FROM students
SELECT * FROM `results`
@AbudiMutamba
AbudiMutamba / Emails from websites in elementor
Created June 16, 2021 16:45
How to setup emails from websites
Make the reply have a field
create ids for all the labels
paste them in the from label
update