Because NOW() is a MySQL method I cannot seem to get it to work in the below array. What is a function I can use in PHP which will do the same thing as the NOW() method.
$data = array('node1id' => $leader_id,
'node2id' => $idgen,
'friendsSince' => NOW(),
$this->db->insert('users', $data);
Use the codeigniter date helper and keep the same notation:
More info on date helper in CI docs here: http://ellislab.com/codeigniter/user_guide/helpers/date_helper.html