<html>
<font face="MS Sans Serif, Geneva">This is what happens when non
programmers pick up programming .. we miss some of the basics along the
way. I'm try to run a conditional select based on the age of the time the
entry was made into the dB (posting_time) .. specifically I plan to offer
the user a form to select all entries made after a chosen date
(cut_off_time)<br>
<br>
something to the affect of<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;cfset
cut_of_time = #DateFormat(Form.date_entered)#&gt;<br>
<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;cfquery
name=&quot;acme&quot; datasource=&quot;main&quot;&gt;<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>SELECT
*<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>FROM
table<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>WHERE
posting_time &gt; #cut_off_time#<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&lt;/cfquery&gt;<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
I can get it to work if I bring them all back and then only present the
entries that clear the condition .. but it seems like a lot more work on
the server that way.<br>
TIA,<br>
<br>
<x-sigsep><p></x-sigsep>
Jordie Fike <br>
Tech Admin<br>
Outer Banks Internet<br>
[EMAIL PROTECTED]<br>
<a href="http://www.outer-banks.nc.us/" eudora="autourl">www.outer-banks.</a>nc<a 
href="http://www.outer-banks.nc.us/" eudora="autourl">.us</a><br>
phone - 1.252.441.6698<br>
fax - 1.252.480.2259<br>
</font></html>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to