<?php
$tbl = 'secc_rural';//schema name
$house_hold_id = '123456';
$query = db_select($tbl.".individual_21", "n");
$query->fields('n',array('name','ahl_tin','ahl_tin','fathername','name_sl','mothername','occupation','yob','hof','genderid','relation','house_hold_id'));
$query->condition('n.house_hold_id',db_like($house_hold_id) . '%', 'LIKE');
$query = $query->extend('TableSort')->extend('PagerDefault')->limit(20);
$result = $query->execute();
$tbl = 'secc_rural';//schema name
$house_hold_id = '123456';
$query = db_select($tbl.".individual_21", "n");
$query->fields('n',array('name','ahl_tin','ahl_tin','fathername','name_sl','mothername','occupation','yob','hof','genderid','relation','house_hold_id'));
$query->condition('n.house_hold_id',db_like($house_hold_id) . '%', 'LIKE');
$query = $query->extend('TableSort')->extend('PagerDefault')->limit(20);
$result = $query->execute();
Comments
Post a Comment