Monthly Archives: December 2018

Free tools for small businesses

Some free tools you can use to start your business. The providers normally provide the free tools for basic usage. Some limitation on features and users. But if you are small, it doesn’t matter much. At least you can start with some cool softwares to support your small business

CRM – hubspot

Support Ticket/ Help Desk – freshdesk

Accounting – waveapps – need to pay to use payroll and payments

Version control – GitLab

Getting things done

To get things done is hard sometimes (or maybe most of the times) especially those things that we don’t like to do

Follow-through is good at converting good intention to action
(from book titled The Power of Get Things Done by Steve Levinson and Chris Cooper)

You can’t rely on motivations or inspirations

You need some force to complete important tasks

  1. feel the accomplishment. how the end products benefit the people. they will be very happy, satisfied, your business will grow, you will get more money etc etc
  2. take your intention more seriously, lot more seriously
  3. commit to a deadline and commit to real people
  4. start small but start now
  5. focus only on single task to do, write the rest in a list
  6. get a mentor or coach that can force you to do right things right
  7. surround yourself with people who are committed to success (network group)
  8. do things at place where people normally do that things. e.g. if to do work, go to office, if to pray, go to mosque. just go
  9. ask/pay someone that can get it done faster even you can also capable of doing it

You need to stay away from distractions

  1. stay away from people who distracts you
  2. put away gadgets and off the tv and other distractions
  3. write down all other things that come on your mind when you are focusing on a task

Multiple database in CodeIgniter

How to connect to more than one database in codeigniter

Database config

$db[‘default’][‘hostname’] = “localhost”;
$db[‘default’][‘username’] = “root”;
$db[‘default’][‘password’] = “”;
$db[‘default’][‘database’] = “database_name”;
$db[‘default’][‘dbdriver’] = “mysql”;

set another config for 2nd database

$db[‘otherdb’][‘hostname’] = “localhost”;
$db[‘otherdb’][‘username’] = “root”;
$db[‘otherdb’][‘password’] = “”;
$db[‘otherdb’][‘database’] = “other_database_name”;
$db[‘otherdb’][‘dbdriver’] = “mysql”;

Sample to call

//Load another database
$DB2 = $this->load->database(‘another_db’, TRUE);

//Default database query
$this->db->select(‘first_name, last_name’);
$this->db->from(‘users’);
$this->db->where(‘id’, 99);
$query = $this->db->get();

//Another database query
$DB2->select(‘image’);
$DB2->from(‘cdn_images’);
$DB2->where(‘id’, 25);
$query = $DB2->get();

 

References

codexworld.com/connect-use-multiple-database-codeigniter