Welcome Guest, Not a member yet? Register   Sign In
Function :
#1

[eluser]Shaileen[/eluser]
I need the CI code for the following :
$SQL_get_tt_exist = "SELECT count(*) from dsl_tt WHERE order_id = '$quote_id' AND resolved = 0";

$sth2 = $dbh->prepare($SQL_get_tt_exist) or die $dbh->errstr;
$sth2->execute;

$tt_exist = $sth2->fetchrow;
$sth2->finish;

if ($tt_exist) {
$tt_link = "<a href='dsl_tt_list.cgi?searchText=$refid'><img src='$c{url}{public_images}/tt_open.gif' border='0'></a>";
}
else {
$tt_link = "<a href='dsl_tt_list.cgi?searchText=$refid'><img src='$c{url}{public_images}/tt_none.gif' border='0'></a>";
}

if ($quote_id ne 'q10000') {
$quote_link = "<A class='dark' HREF='./t1_quote_view.cgi?index=$quote_id'>Q</A>";
}
else {
$quote_link = "-";
}


I have written the following funtion that can be used :

function get_tt_exist($order_id)
{

$this->db->where('order_id ', $order_id);
$this->db->where('resolved', 0);
$data = $this->db->count_all('dsl_tt');
return $data;


}

How can I use this in my view ?


Messages In This Thread
Function : - by El Forum - 02-26-2010, 09:59 AM
Function : - by El Forum - 02-26-2010, 10:17 AM
Function : - by El Forum - 02-26-2010, 11:15 AM
Function : - by El Forum - 02-26-2010, 03:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB