thanks, also memcache came with
64MB of maximum memory and
1024 Maximum Connections, what will be the best value for that two fields?
Code: Select all
function GetAllAuctions($active = 1, $closed = 0, $limit = 0)
{
if($limit > 0)
$this->db->limit($limit);
$query = $this->db->get_where('auctions', array('active' => $active, 'closed' => $closed));
$data = NULL;
if ($query->num_rows() > 0)
$data = $query->result_array();
$query->free_result();
return $this->PrepareAuctions($data);
}
Since it is only for active and unclosed auctions, it may not go more than 50 - 100 auctions
table size:
Code: Select all
CREATE TABLE IF NOT EXISTS `auctions` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`active` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`name` varchar(50) NOT NULL,
`description` text NOT NULL,
`img` varchar(255) NOT NULL,
`allowautobid` tinyint(1) UNSIGNED NOT NULL DEFAULT '1',
`nosuspension` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`bidtime` tinyint(3) UNSIGNED NOT NULL DEFAULT '15',
`bidprice` decimal(2,2) UNSIGNED NOT NULL DEFAULT '0.01',
`realprice` decimal(5,2) UNSIGNED NOT NULL,
`currenttime` time NOT NULL,
`maxtime` tinyint(3) UNSIGNED NOT NULL DEFAULT '60',
`currentprice` decimal(5,2) UNSIGNED NOT NULL DEFAULT '0.00',
`standby` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`closed` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`shipmenttax` decimal(3,2) UNSIGNED NOT NULL,
`currentuser` varchar(20) DEFAULT NULL,
`seconduser` varchar(20) DEFAULT NULL,
`thirduser` varchar(20) DEFAULT NULL,
`paytype` tinyint(3) UNSIGNED NOT NULL DEFAULT '255',
`closedate` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Store all items for auction' AUTO_INCREMENT=1;