$res = array(‘test1’,’test2’);
$sql_query = db_select(testtable', 's');
$sql_query->fields('s', array('filename', 'filetype', 'createdon'));
$sql_query->condition('s.filetype',$res,'IN');
$datearray = array(‘2011-02-02’,date('Y-m-d'));
$sql_query->condition('s.createdon',$datearray,'BETWEEN');
$sql_query = $sql_query->limit(5)->execute();
Thank you so much!
ReplyDelete