Skip to main content

Posts

Showing posts from February, 2014

Join 3 tables in codeigniter

Join in codeigniter Join 3 tables by codeigniter $query = ee()->db->select('b.id,b.rec_date,b.status,b.member_id, b.merchant_name, b.order_number, b.shipping_company, b.tracking_number,b.optional_service, b.inspected, c.first_name, c.last_name, c.mailbox_number,d.group_title as membership') ->from('exp_incoming_order b') ->order_by('b.id','desc') ->join('exp_members c', 'b.member_id=c.member_id and '.$whereCond) ->join('exp_member_groups d', 'd.group_id=c.group_id') ->limit($this->perpage, $rownum) ->get();

Google login Api with php

How to create Google login Step: 1 Go to this url https://cloud.google.com/console Step 2: Create a project Step 3: Enter the project name Step 4: Now on google+ api Step 5: Now click on credentials and click on create new id Step 6: Enter the redirect url Now put this code in header <?php $response_type1 = "code"; $client_id1 = "38789626348.apps.googleusercontent.com"; $redirect_uri1 = "http://example.com/Homes/user_google_login"; $scope1 = "https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile"; //$scope = "https://www.googleapis.com/auth/userinfo.profile"; $state1 = "access"; ?> <script type="text/javascript"> function student_google_login(){ window.open("https://accounts.google.com/o/oauth2/auth?response_type=<?php echo $response_type1;?>&client_id=<?php echo $client