Oh, I also had to pull the quotes from the Date/Time field but that was a really easy fix. I'm used to changing quotes around on those as I can never remember if they're sent as a string or not.
-b-
Here's the generated SQL:
INSERT INTO photos (id,photo_name,album_id,photo_date,caption,descrip,random,include) VALUES (,'01.jpg',2,{ts '2000-01-01 00:00:00'},'none','none desc',1,1)
This has actually sovled my problem. Here are some questions I have.
The ID field is an autonumber, so I...
Here's the error:
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
The error occurred while processing an element with a general identifier of (CFQUERY), occupying document...
I'm getting a Syntax Error on the following statement...
<cfquery name="add_photo" datasource="domicron">
INSERT INTO photos (id,photo_name,album_id,photo_date,caption,descrip,random,include) VALUES...
hey rudy...
i hope you mean 'GT 0' not 'GT )" right?
thanks man, i was actually just spelling the variable wrong... *sheepish look* that was a big help
-b-
First off.... happy holidays to everyone. Hope you're all enjoying time with family and friends.
Ok, I'd like to set up a CFIF statment that would allow me to add a piece of text to a page depending on where the user came from.
something like:
<CFIF http_referrer CONTAINS [sitename]>
<p>you're...
Is there a CF5 function that would allow me to display an integer returned by x.RecordCount as English text? ie: 25 displayed as Twenty-five?
How can i do it if there is no function?
Thanks in advance...
-b-
OK. This really is a question, it's just really long. Let's see. I'm using this:
<cfif month(Now()) GTE 9 AND month(Now()) LTE 12>
<cfquery name="events2" datasource="ksuperc">
SELECT * FROM events WHERE year(event_date) = year(Now()) AND month(event_date) BETWEEN 9 and 12...
nope, never mind... i was using the wrong value... fall was 3, not 1... i'm a putz... [blush]
If anyone sees any problems though, please let me know
-b-
I've been having a problem with an events display page for a college performing group. We want to sort the records by semester and year from the date field and that's been taken care of. The problem is displaying them dynamically.
Here's the query:
<cfquery name="events2"...
Oops, got it now...
William and Ken were both really close...
I couldn't call 'event_year' as and ORDER BY.... and I didn't need the 'Month(event_date)'
SELECT DISTINCT
IIF (Month(event_date) BETWEEN 9 and 12,'FAL',
IIF (Month(event_date) BETWEEN 5 and 8,' SUM',
' SPR')) as...
First suggestion:
[Microsoft][ODBC Microsoft Access Driver] ORDER BY clause (event_year) conflicts with DISTINCT.
Second suggestion:
[Microsoft][ODBC Microsoft Access Driver] ORDER BY clause (Month(event_date)) conflicts with DISTINCT.
ORDER BY either does not work with DISTINCT, or I'm not...
I have this query in a ColdFusion page:
<cfquery name="list_events" datasource="ksuperc">
SELECT DISTINCT
IIF (Month(event_date) BETWEEN 9 and 12,'FAL',
IIF (Month(event_date) BETWEEN 5 and 8,' SUM',
' SPR')) as event_semester,
year(event_date) as event_year
FROM...
I think I get it. How's this?
<!--- BEGIN EXAMPLE --->
<cfquery name="get_random" datasource="datasource">
SELECT count(*) as howmany FROM table WHERE random = True
</cfquery>
<cfset rec=Int(howmany * Rand())>
<!-- WOULD I STILL NEED THIS TO PREVENT ZERO FROM BEING...
I'm trying to display a single random record from a recordset. Will this code work? I'm at work right now, and can't test it out.
<!--- BEGIN EXMAPLE --->
<cfquery name="random" datasource="datasource">
SELECT * FROM table WHERE random = True
</cfquery>
<cfset...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.