Posts

sql - join one table if condition met otherwise from another table -

i want know sql query following condition i have 3 tables, table 1 want data, second table1mapping , third master table. i want data table1mapping if related data exists otherwise master table , table 1 . table 1 common. for example: table 1: id name 1 abc table1mapping: table1id country code 1 958 2 ind 89 master country code uk 87 56 ind 45 user can select multiple countries. if selects , ind code should table1mapping , ind should master there no data id 1 , us. code may different in both tables. you didn't provide schema created fantasy data show how can like. description: use 2 left joins in combination coalesce, give first element not null. declare @tab1 table ( id int ) declare @tabmapping table ( id int, anycol varchar(100) ) declare @tabmaster table ( id int, anycol varchar(100) ) insert @tab1 (id) values (1),(2),(3),(4),(5),(...

Adding cms block to footer links magento -

how can add cms static block footer footer links , view on specific store view ? using magento 1.9 creating static block: go magento admin panel , select cms -> static blocks then click on “add new block” button right top now fill following fields: block title: give name of static block here. not show on frontend identifier: give id of block. used reference of block, when adding template file or cms page status: define visibility of static block on frontend content: content of static block can plain text, html code , javascript. click on “save block” button. showing static block in frontend @ footer: go app > design > frontend > your_package > your_theme > layout. open appropriate file, lets page.xml , add following code inside <block type="page/html_footer name="footer" as="footer" template="page/html/footer.phtml""> block: <block type="cms/block" name="your_block_id" be...

iphone - How to add survey monkey ios sdk inside my ios application? -

how integrate surveymonkey ios sdk inside ios app? viewcontroller.h have tried following code in project; #import <uikit/uikit.h> #import <surveymonkeyiossdk/surveymonkeyiossdk.h> @interface viewcontroller : uiviewcontroller @property (nonatomic, strong) smfeedbackviewcontroller * feedbackcontroller; @end viewcontroller.m #import "viewcontroller.h" //static nsstring *sample_survey_hash=@"e7bvbydjgchg6vyr2qyrzxkq"; //#define sample_survey_hash @"43w3ikqgkvjcvrlvko8bxt_2frxe_2bvhergqp5w2r5tc2c_3d" #define feedback_question_id @"813797519" #define feedback_five_stars_row_id @"9082377273" #define feedback_four_stars_row_id @"9082377274" #define sample_app @"survey_sample" #define survey_hash @"lbqk27g" #define app_id @"dh9k6dy" @interface viewcontroller () <smfeedbackdelegate, uialertviewdelegate> @property (weak, nonatomic) iboutlet uibutton *takesurveybutton; @propert...

File upload in Mobile Safari -

which file types applicable upload in mobile safari using html file input? i've tried jpg, png, bmp, gif, tif, tiff , works, i'd have complete list of files. the developer documentation not list restrictions, you're safe assume there aren't any: file uploads , downloads safari on ios supports file uploading—that is, <input type="file"> elements—on ios 6 , later. note in ios 6 8 you're limited photo library anyway, what's in there works. in ios 9 there's new file upload dialog, apparently allows uploads various cloud storage services expands scope of file uploads in mobile safari significantly.

php - SEARCHING with some condition in codeigniter -

i have web project using codeigniter. have problem searching in project. have show multiple result searching page keyword. here model function find_user($like){ $this->db->from('user'); $this->db->like('name', $like,'after'); $result =$this->db->get(); return $result->result_array(); } and in user table, include id | name | place_code in user table , column place_code use show place user here controller function search(){ $query = $this->input->post('query_cari'); $find = $this->m_user->find_user($query); foreach ($find $key) { $code = $key['place_code']; if ($code == '1') { $place = 'secretray'; }elseif($code == '2'){ $place = 'ob'; }elseif($code == '3'){ $place ='manager'; } } $data['result'] = $find; $data['place'] ...

retrofit - Android App not connecting to network which is on **localhost** and if trying to run on Real Mobile Phone -

Image
i have created 1 android app communicate restful webservice using retrofit .it performing when running on **genymotion **,means sending request , getting respond back. but when run on real mobile phone ,app running not sending request also.can tell me why happening ? afteredit: when have gson gson = new gsonbuilder() .setfieldnamingpolicy(fieldnamingpolicy.lower_case_with_underscores).create(); restadapter restadapter = new restadapter.builder() .setendpoint("http://10.0.3.2:8082") .setconverter(new gsonconverter(gson)) .build(); retrofitservice service = restadapter.create(retrofitservice.class); try { serverresponse serverresponse = service.checklogin(logindetails); ...} where retrofit interface public interface retrofitservice { @headers({ "content-type: application/json" }) @post("/vendorwebapplication/userlogin") public serverresponse checklogin(@body logind...

Issue document to open in edit mode using lotus Notes Cilent -

this link using open document in edit mode , document opening in read mode. check there no issue author field.so can suggest me issue might be. notes://cb10dev@cbob/__85257c2f005410fe.nsf/0/8c2f729af16f74dd85257c85007860b0?editdocument