Welcome Guest, Not a member yet? Register   Sign In
active record for [where date >= now()]
#8

[eluser]RaZoR LeGaCy[/eluser]
Okay I'll explain better

This query is needed of the section in http://www.hellhorror.com where it says "Upcoming Horror Movies" in the upper right hand side.

So I had in my hand written code and it worked
Code:
mysql_select_db($database_HH, $HH);
$query_events = "SELECT * FROM hh_events WHERE  dvd = 1 AND `date` >= NOW() OR theater = 1 AND `date` >= NOW() ORDER BY `date` ASC LIMIT 0,6";
$events = mysql_query($query_events, $HH) or die(mysql_error());
$totalRows_events = mysql_num_rows($events);

But

I can't use that code in CI for some reason

MY DB structure Dump
Code:
--
-- Table structure for table `hh_events`
--

CREATE TABLE `hh_events` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(128) collate utf8_unicode_ci NOT NULL default '',
  `text` text collate utf8_unicode_ci NOT NULL,
  `date` date NOT NULL default '0000-00-00',
  `dvd` enum('1','0') collate utf8_unicode_ci NOT NULL default '0',
  `theater` enum('1','0') collate utf8_unicode_ci NOT NULL default '0',
  `game` enum('1','0') collate utf8_unicode_ci NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='release_dates' AUTO_INCREMENT=62 ;

--

Please someone try to replicate and see what may be a hack of some sort

Thanks ALL


Messages In This Thread
active record for [where date >= now()] - by El Forum - 08-01-2007, 08:26 PM
active record for [where date >= now()] - by El Forum - 08-01-2007, 08:35 PM
active record for [where date >= now()] - by El Forum - 08-01-2007, 08:38 PM
active record for [where date >= now()] - by El Forum - 08-02-2007, 09:22 AM
active record for [where date >= now()] - by El Forum - 08-02-2007, 05:17 PM
active record for [where date >= now()] - by El Forum - 08-02-2007, 06:18 PM
active record for [where date >= now()] - by El Forum - 08-03-2007, 06:48 AM
active record for [where date >= now()] - by El Forum - 08-04-2007, 12:19 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 04:12 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 07:06 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 07:45 PM
active record for [where date >= now()] - by El Forum - 08-06-2007, 09:52 PM
active record for [where date >= now()] - by El Forum - 09-23-2007, 10:19 AM
active record for [where date >= now()] - by El Forum - 09-23-2007, 08:50 PM
active record for [where date >= now()] - by El Forum - 09-23-2007, 11:01 PM
active record for [where date >= now()] - by El Forum - 09-24-2007, 03:48 AM
active record for [where date >= now()] - by El Forum - 09-28-2007, 12:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB