Re: Update Record by Date then pick Random from Query

2009-05-04 Thread Sin Tec
Thank you both. The parenthesis around all the ORs worked. Some of my first code had the Date in the Where but I am using the enable/disable so that the Admin knows if the ad contract is up or not. ~| Adobe® ColdFusion® 8 sof

Update Record by Date then pick Random from Query

2009-05-04 Thread Sin Tec
I have been making a ad system that randomly selects a ad. Code below works. SELECT top 1 * FROM dbo.#request.stationName#_banner_top WHERE (page_location = 'Front Page') OR (page_location2 = 'Front Page') OR (page_location3 = 'Front Pa

Re: Loop in Distinct loop with more then one column

2009-03-11 Thread Sin Tec
Im still a newbie to coldfusion and trying to make my way through it all as I go so yeah my code doesnt have the best of structure. Your code below works great for what I am doing. Thank you. Also thank you for the class tip it will make it easier in the longrun. >I think your first problem

Loop in Distinct loop with more then one column

2009-03-06 Thread Sin Tec
Im doing a loop within a loop to get the distinct Category in the records for a business directory. It works great if there is just one column of categories but I have it set up where you can add the record in three different categories. Below works with one category SELECT DISTINCT cate

Re: Query based on Checkbox clicked/unclicked

2009-03-05 Thread Sin Tec
AND newsletter = This works! Thank you. I had tryed the the IsDefined before I posted and it didnt work for me. > > SELECT * > FROM dbo.#stationName#_listener_list > Where (username LIKE cfsqltype="cf_sql_clob"> > OR name LIKE ) > > AND newsletter = > > ~~

Query based on Checkbox clicked/unclicked

2009-03-05 Thread Sin Tec
Im trying to output a query based on criteria passed from a form and having a brain fart. Users sign up and are able to check if they want to recieve the newsletter or not. If so a 1 is put in the newsletter row in the table. Im creating a search form where I can output them all but then I can

Re: Reorder Records for Navigation help

2009-02-05 Thread Sin Tec
I am having troubles getting this to work. Do you happen to have a working example? >It would probably be best to use recursion to accomplish this. Recursion >made my head hurt (a lot) the first time I tried to get my head around it as >well. The idea is to use a parent ID to link sub menu items

Reorder Records for Navigation help

2009-02-03 Thread Sin Tec
The code below changes the rank of the item when clicking the up of the down and reorders it. I am trying to use this for navigation where I will add subitems to the list. When the rank of the Main Item is change it will carry the subitems with it. Example - Main1 sub1a

Re: Firefox outputting different variable then IE

2009-01-23 Thread Sin Tec
Wow that was easy. I had my Button name as search t. Thank you so much. Dumbie me. >When you get "value1,value2" for a given form variable, it usually means you >have two form fields with the same name. Check the form for dupes. > >Adrian ~

Firefox outputting different variable then IE

2009-01-23 Thread Sin Tec
I am having trouble with my search function in Firefox. Works in IE but not in Firefox. I am doing a cfdump for form.search and when I do a search and for lets say "Title" it works fine in IE but then in Firefox i get "Title,search" which doesnt pull anything. Any Ideas? Thank You I have

Dynamic Flash

2009-01-19 Thread Sin Tec
I am trying to output a video name dynamicly with coldfusion with JW FLV Player http://www.longtailvideo.com/players/jw-flv-player/ but keep getting a 404:Error 2032. I have the same file in the body tag when it loads and that works just fine. But then if i try on the dynamic link which just ou

Re: Coldfusion + FFmpeg

2009-01-16 Thread Sin Tec
INSERT INTO dbo.video (video) VALUES ('#VideoFileName#') Ok so uploads then takes that file and then converts it. Im then trying to insert the name into the db. Well kinda. Suggestions on cleaning up the code? ~~

Coldfusion + FFmpeg

2009-01-16 Thread Sin Tec
I am trying to set up a kinda on the fly page for converting video to flash via coldfusion and ffmpeg. cfsearch has a cfexacute that converts the video but you have to put the file name in the code. http://cfsearching.blogspot.com/2008/01/cfexecute-ffmpeg-and-mencoder-mystery.html

Re: Advertisment Content Management - problem with random image

2009-01-06 Thread Sin Tec
Ok I think I fixed it. I forgot to ORDER BY newID() Thank you. > New Problem. A have advertisements but want to assign them to > different pages. I guess im just new to it all and lack the thinking. > > > Im trying to set it all up to where you can put it in three locations > if you want.

Re: Advertisment Content Management - problem with random image

2009-01-06 Thread Sin Tec
New Problem. A have advertisements but want to assign them to different pages. I guess im just new to it all and lack the thinking. Im trying to set it all up to where you can put it in three locations if you want. Im using ORs but the ORs stop the query once it finds something. So if I have

Re: Advertisment Content Management - problem with random image

2008-12-09 Thread Sin Tec
It was pulling in the wrong ADID when showing an image... I had to put #GetAds.ADID# in the Where instead of just #ADID#. UPDATE dbo.banner_left SET views = #add# WHERE ADID = #GetAds.ADID# It seems to be working now. Thank you so much for all your help. ~

Re: Advertisment Content Management - problem with random image

2008-12-08 Thread Sin Tec
Tried Isaac's and it doesnt count any of the views. SELECT * from dbo.banner_left SELECT * FROM getCachedAds WHERE ADID = #ADID# ORDER BY ADID UPDATE dbo.banner_left SET views = #add# WHERE ADID = #ADID# ~~

Re: Advertisment Content Management - problem with random image

2008-12-08 Thread Sin Tec
I tried Mikes code: SELECT top 1 * FROM dbo.banner_left ORDER BY newID() works great for the random but it screws up the views. UPDATE dbo.banner_left SET views = #add# WHERE ADID = #ADID# It either doesnt count it or it will pull the views from another record puts it in that

Advertisment Content Management - problem with random image

2008-12-03 Thread Sin Tec
I am using a varent from sparty2809 on http://tutorial323.easycfm.com/ It works great but was created for ACCESS and uses an autonumber datatype. Its great when you just keep adding advertisments but when you delete one there is now a gap in the +one ADID (int - identity specification). When th