SlideShare a Scribd company logo
The most Powerful tool in



 Eden
What are the things
   you can do
    in Mysql?
• Insert   • Update
• Select • Delete
<?php

//Create connection
$connection =
mysql_connect(‘localhost’, ‘root’, ‘’);
mysql_select_db(‘eden’,
$connection);
//Inserting Data
$query = “INSERT INTO user (
     user_name,
     user_email,
     user_password)
VALUES (
     ‘dan’,
     ‘danmichaelmolina@gmail.com’,
     ‘1234abcd’)”;
//Selecting Data
$query = “SELECT * FROM user
WHERE
     user_email =
     ‘danmichaelmolina@gmail.com’”;
//Updating Data
$query = “UPDATE user SET
    user_name = ‘dan michael’
WHERE
    user_email =
    ‘danmichaelmolina@gmail.com’”;
//Deleting Data
$query = “DELETE FROM user
WHERE
    user_email =
    ‘danmichaelmolina@gmail.com’”;
//Execute your query
mysql_query($query);

//Close your connection
mysql_close($connection);

//Get the result and output
Are You Tired of
  doing that?
Guest What?
How Mysql in Eden
     Works!
<?php
//1. Include eden.php single file
Include(‘eden.php’);

//2. Create a DB connection
$database = eden(
     ‘mysql’,     ‘host’,
     ‘db_name’, ‘user’,
     ‘password’);
Inserting Data Using Model

//Set all fields you need
//Then save
$database->model()
    ->setColumnName(‘*Value+’)
    ->setColumnName(‘*Value+’)
    ->save(‘*Table+’)
//Set all fields you need
//Then save
$database->model()
    ->setUserName(‘Dan’)
    ->setUserPassword(‘123abc’)
    ->save(‘user’)
Select, Update & Deleting Data
//Select data, update and save.
$database->search(‘user’)
      ->innerJoinOn(‘school’, ‘school_id = user_school’)
      ->leftJoinOn(‘address’, ‘address_user = user_id’)
      ->getCollection()
      ->setAddressCreated(time())
      ->setSchoolYear(‘2010 - 2012’)
      ->setAddressCity(‘Makati’)
      ->copy(‘user_id’, ‘address_user’)
      ->save(‘school’)
      ->save(‘address’);
SMTP
//Setup connection
$smtp = eden('mail')->smtp(
    ‘*smtp server+’,
    ‘*email account+’,
    ‘*password+’,
    ‘*port+’, Boolean);
//Setup connection
$smtp = eden('mail')->smtp(
    ‘smtp.gmail.com’,
    ‘dummy@gmail.com’,
    ‘password’,
    465, true);
//Complete your email
$smtp->setSubject(‘*Subject+’)
    ->setBody(‘*Body+’, Boolean)
    ->addTo(‘*Email Account+’)
    ->addCC(‘*Email Account+’)
    ->addBCC(‘*Email Account+’)
    ->addAttachment(
         ‘*Filename+’,    ‘*File Path+’,
         ‘*Image Mime+’)
    ->send();
//Complete your email
$smtp->setSubject(‘Hello SMTP’)
    ->setBody(‘<b>This is the body</b>’, true)
    ->addTo(‘danmichaelmolina@gmail.com’)
    ->addCC(‘dummy@gmail’)
    ->addBCC(‘dummy@gmail.com’)
    ->addAttachment(
         ‘file.jpg’,      ‘/path/file.jpg’,
         ‘mime-type’)
    ->send();
$smtp->disconnect();
Thank You!

More Related Content

PPT
Mysocial databasequeries
PPT
Mysocial databasequeries
PDF
Mysql & Php
KEY
Introduction à CoffeeScript pour ParisRB
PDF
Drupal Step-by-Step: How We Built Our Training Site, Part 1
PDF
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
PDF
Add edit delete in Codeigniter in PHP
PDF
Country State City Dropdown in PHP
Mysocial databasequeries
Mysocial databasequeries
Mysql & Php
Introduction à CoffeeScript pour ParisRB
Drupal Step-by-Step: How We Built Our Training Site, Part 1
jQuery UI Widgets, Drag and Drop, Drupal 7 Javascript
Add edit delete in Codeigniter in PHP
Country State City Dropdown in PHP

What's hot (20)

PPTX
PDF
Pagination in PHP
PDF
jQuery secrets
PPTX
15. CodeIgniter editarea inregistrarilor
ZIP
Drupal Development (Part 2)
PDF
与 PHP 和 Perl 使用 MySQL 数据库
PPT
Kick start with j query
PPTX
Big Data for each one of us
PPTX
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
PPTX
Magento Dependency Injection
TXT
PPT
Drupal csu-open atriumname
PPTX
Sql inyection
PDF
Separation of concerns - DPC12
PPT
06 Php Mysql Connect Query
KEY
PDF
Command-Oriented Architecture
TXT
Daily notes
PPTX
CodeIgniter Class Reference
PDF
Self join in active record association
Pagination in PHP
jQuery secrets
15. CodeIgniter editarea inregistrarilor
Drupal Development (Part 2)
与 PHP 和 Perl 使用 MySQL 数据库
Kick start with j query
Big Data for each one of us
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
Magento Dependency Injection
Drupal csu-open atriumname
Sql inyection
Separation of concerns - DPC12
06 Php Mysql Connect Query
Command-Oriented Architecture
Daily notes
CodeIgniter Class Reference
Self join in active record association

Similar to Eden Hackathon Benilde (Mysql & SMTP) (20)

PDF
MySQL for beginners
PDF
veracruz
PDF
veracruz
PDF
veracruz
PDF
veracruz
PPTX
PPTX
PPTX
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
PPTX
UNIT V (5).pptx
PPT
My sql with querys
PPT
MySQLi - An Improved Extension of MySQL
PPT
Lecture 15 - MySQL- PHP 1.ppt
PPT
qwe.ppt
PPT
PPTX
Unit 4- Working with SQL.pptx
PPTX
chapter_Seven Database manipulation using php.pptx
PPTX
PHP FUNCTIONS
PPTX
CVJ531: Intro to MySQL
MySQL for beginners
veracruz
veracruz
veracruz
veracruz
Database Connectivity MYSQL by Dr.C.R.Dhivyaa Kongu Engineering College
UNIT V (5).pptx
My sql with querys
MySQLi - An Improved Extension of MySQL
Lecture 15 - MySQL- PHP 1.ppt
qwe.ppt
Unit 4- Working with SQL.pptx
chapter_Seven Database manipulation using php.pptx
PHP FUNCTIONS
CVJ531: Intro to MySQL

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation theory and applications.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPT
Teaching material agriculture food technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Cloud computing and distributed systems.
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Electronic commerce courselecture one. Pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
Encapsulation theory and applications.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Teaching material agriculture food technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Cloud computing and distributed systems.
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Approach and Philosophy of On baking technology
Electronic commerce courselecture one. Pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Digital-Transformation-Roadmap-for-Companies.pptx

Eden Hackathon Benilde (Mysql & SMTP)