[Vtigercrm-developers] Can't we pass two parameters for a select query?

kiran kiranraju.jakka at gmail.com
Sat Oct 1 13:30:33 GMT 2016


Sorry for asking this type of questions in this forum. I did it finally with
the following code.

<?php
	global $log;
if (!function_exists('start_date')) {

    function start_date($projectid, $stage){

    	$adb = PearDatabase::getInstance();

    	//$stage = "Stage-0";

    	$data = $adb->pquery("SELECT startdate FROM vtiger_projecttask WHERE
projectid = ? AND projecttasktype=?", array($projectid, $stage));

    	$num_rows = $adb->num_rows($data);

		for($i=0; $i<$num_rows; $i++) {
			$col3[$i] = $adb->query_result($data, $i,'startdate');		
		}

		return $col3[0];
    }
}

Thanks.



--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Can-t-we-pass-two-parameters-for-a-select-query-tp19938p19941.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list