RE: How to write this query?

2008-04-13 Thread Rick Faircloth
Thanks for the reply, Azadi.

However, your solution has the same problem I encountered
with a regular JOIN statement:  the limit 1 part of the
interior select statement limited my results to only 1 property
with 1 photo, instead of all properties, but only 1 photo each.

I tried:

select sa.street_number, sa.street_name, sa.city, sa.public_remarks_01,
  sa.public_remarks_02, sa.public_remarks_03, sa.list_price
  from smlc_acr sa
 inner join 
   select sap.photo_filename, sap.photo_mls_number
  from smlc_acr_photos sap
on sa.mls_number = sap.photo_mls_number
 order by list_price

but that gives me this error:

You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version
for the right syntax to use near 'select sap.photo_filename,
sap.photo_mls_number from smlc_acr_photos sap ' at line 4

I can't see the error in my syntax.  But then, again, I'm not the
most experienced join writer, having avoided them when I could.

Thanks, again.

Rick

 -Original Message-
 From: Azadi Saryev [mailto:[EMAIL PROTECTED]
 Sent: Sunday, April 13, 2008 1:45 AM
 To: CF-Talk
 Subject: Re: How to write this query?
 
 something like the following (note: mysql syntax):
 
 SELECT sa.street_number, sa.street_name, sa.city, sa.public_remarks_01,
 sa.public_remarks_02, sa.public_remarks_03, sa.list_price, 
 SAP_SQ.photo_filename
 FROM smlc_acr sa INNER JOIN (SELECT photo_filename, photo_mls_number FROM 
 smlc_acr_photos sap
WHERE
 photo_filename  '' LIMIT 1) SAP_SQ ON sa.mls_number = 
 SAP_SQ.photo_mls_number
 ORDER BY sa.list_price
 
 Azadi Saryev
 Sabai-dee.com
 http://www.sabai-dee.com/
 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303248
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How to write this query?

2008-04-13 Thread [STS] Ravi Gehlot
Rick,

  You can use FROM and immediately use ON. That's why you have a syntax
error. ON is used with joins.

Ravi.




On Sun, Apr 13, 2008 at 7:23 AM, Rick Faircloth [EMAIL PROTECTED]
wrote:

 Thanks for the reply, Azadi.

 However, your solution has the same problem I encountered
 with a regular JOIN statement:  the limit 1 part of the
 interior select statement limited my results to only 1 property
 with 1 photo, instead of all properties, but only 1 photo each.

 I tried:

select sa.street_number, sa.street_name, sa.city,
 sa.public_remarks_01,
   sa.public_remarks_02, sa.public_remarks_03, sa.list_price
   from smlc_acr sa
 inner join
   select sap.photo_filename, sap.photo_mls_number
  from smlc_acr_photos sap
on sa.mls_number = sap.photo_mls_number
 order by list_price

 but that gives me this error:

 You have an error in your SQL syntax;
 check the manual that corresponds to your MySQL server version
 for the right syntax to use near 'select sap.photo_filename,
 sap.photo_mls_number from smlc_acr_photos sap ' at line 4

 I can't see the error in my syntax.  But then, again, I'm not the
 most experienced join writer, having avoided them when I could.

 Thanks, again.

 Rick

  -Original Message-
  From: Azadi Saryev [mailto:[EMAIL PROTECTED]
  Sent: Sunday, April 13, 2008 1:45 AM
  To: CF-Talk
  Subject: Re: How to write this query?
 
  something like the following (note: mysql syntax):
 
  SELECT sa.street_number, sa.street_name, sa.city, sa.public_remarks_01,
  sa.public_remarks_02, sa.public_remarks_03, sa.list_price,
 SAP_SQ.photo_filename
  FROM smlc_acr sa INNER JOIN (SELECT photo_filename, photo_mls_number
 FROM smlc_acr_photos sap
 WHERE
  photo_filename  '' LIMIT 1) SAP_SQ ON sa.mls_number =
 SAP_SQ.photo_mls_number
  ORDER BY sa.list_price
 
  Azadi Saryev
  Sabai-dee.com
  http://www.sabai-dee.com/
 



 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303249
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: weird issue in browser with cf8 and long execution times

2008-04-13 Thread Rick Faircloth
I remember getting that error when trying to complete a
long-running cfftp request.

It's been awhile, and I'm not sure what actually solved the issue,
but I did look back at the file and remember adding
cfsetting requesttimeout=6
to the code at the top of the page.

Perhaps setting a high requesttimeout will help.

If I think of something else, I'll pass it on to you.

Rick

 -Original Message-
 From: Randy Johnson [mailto:[EMAIL PROTECTED]
 Sent: Sunday, April 13, 2008 12:15 AM
 To: CF-Talk
 Subject: weird issue in browser with cf8 and long execution times
 
 Hello,
 
 I am running CF8 Standard.
 
 I am running a page that takes a few minutes to run.   After a certain
 amount of time a gray box will popup and ask me to save the index.cfm file
 or open it.  When I open it or save it the file is always blank.
 
 When this happens it looks like the page is done executing in the browser
 but if you look in the task manager you see that JRUN is still using the
 CPU.  I have also confirmed that the page is still running by doing a
 refresh in Navicat which shows that more rows are being added to the
 database table.
 
 The page is reading an XML file, parsing it and then looping over to insert
 data into the database.
 
 Has anyone seen this before or know what I need to do to stop it from
 happening?
 
 
 Thanks!
 
 Randy
 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303250
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: How to write this query?

2008-04-13 Thread [STS] Ravi Gehlot
I meant to say can not

Ravi.



On Sun, Apr 13, 2008 at 7:30 AM, [STS] Ravi Gehlot 
[EMAIL PROTECTED] wrote:

 Rick,

   You can use FROM and immediately use ON. That's why you have a
 syntax error. ON is used with joins.

 Ravi.





 On Sun, Apr 13, 2008 at 7:23 AM, Rick Faircloth [EMAIL PROTECTED]
 wrote:

  Thanks for the reply, Azadi.
 
  However, your solution has the same problem I encountered
  with a regular JOIN statement:  the limit 1 part of the
  interior select statement limited my results to only 1 property
  with 1 photo, instead of all properties, but only 1 photo each.
 
  I tried:
 
 select sa.street_number, sa.street_name, sa.city,
  sa.public_remarks_01,
sa.public_remarks_02, sa.public_remarks_03, sa.list_price
from smlc_acr sa
  inner join
select sap.photo_filename, sap.photo_mls_number
   from smlc_acr_photos sap
 on sa.mls_number = sap.photo_mls_number
  order by list_price
 
  but that gives me this error:
 
  You have an error in your SQL syntax;
  check the manual that corresponds to your MySQL server version
  for the right syntax to use near 'select sap.photo_filename,
  sap.photo_mls_number from smlc_acr_photos sap ' at line 4
 
  I can't see the error in my syntax.  But then, again, I'm not the
  most experienced join writer, having avoided them when I could.
 
  Thanks, again.
 
  Rick
 
   -Original Message-
   From: Azadi Saryev [mailto:[EMAIL PROTECTED]
   Sent: Sunday, April 13, 2008 1:45 AM
   To: CF-Talk
   Subject: Re: How to write this query?
  
   something like the following (note: mysql syntax):
  
   SELECT sa.street_number, sa.street_name, sa.city,
  sa.public_remarks_01,
   sa.public_remarks_02, sa.public_remarks_03, sa.list_price,
  SAP_SQ.photo_filename
   FROM smlc_acr sa INNER JOIN (SELECT photo_filename, photo_mls_number
  FROM smlc_acr_photos sap
  WHERE
   photo_filename  '' LIMIT 1) SAP_SQ ON sa.mls_number =
  SAP_SQ.photo_mls_number
   ORDER BY sa.list_price
  
   Azadi Saryev
   Sabai-dee.com
   http://www.sabai-dee.com/
  
 
 
 
  

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303251
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: weird issue in browser with cf8 and long execution times

2008-04-13 Thread [STS] Ravi Gehlot
It is weird that it asks you to save the index.cfm file. The only time I had
that problem was when IIS was not configured to open CFM files. Same had
happened with Apache. But since you are saying that the process are running
on the background with data being inserted into the database it makes me
think that this is not a problem of adding CFM to IIS/Apache Index
Directory.

Ravi.




On Sun, Apr 13, 2008 at 7:30 AM, Rick Faircloth [EMAIL PROTECTED]
wrote:

 I remember getting that error when trying to complete a
 long-running cfftp request.

 It's been awhile, and I'm not sure what actually solved the issue,
 but I did look back at the file and remember adding
 cfsetting requesttimeout=6
 to the code at the top of the page.

 Perhaps setting a high requesttimeout will help.

 If I think of something else, I'll pass it on to you.

 Rick

  -Original Message-
  From: Randy Johnson [mailto:[EMAIL PROTECTED]
  Sent: Sunday, April 13, 2008 12:15 AM
  To: CF-Talk
  Subject: weird issue in browser with cf8 and long execution times
 
  Hello,
 
  I am running CF8 Standard.
 
  I am running a page that takes a few minutes to run.   After a certain
  amount of time a gray box will popup and ask me to save the index.cfm
 file
  or open it.  When I open it or save it the file is always blank.
 
  When this happens it looks like the page is done executing in the
 browser
  but if you look in the task manager you see that JRUN is still using the
  CPU.  I have also confirmed that the page is still running by doing a
  refresh in Navicat which shows that more rows are being added to the
  database table.
 
  The page is reading an XML file, parsing it and then looping over to
 insert
  data into the database.
 
  Has anyone seen this before or know what I need to do to stop it from
  happening?
 
 
  Thanks!
 
  Randy
 
 
 

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303252
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: How to write this query?

2008-04-13 Thread Kris Jones
How about something like:

select sa.street_number, sa.street_name, sa.city,
sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
sa.list_price,
(select top 1 sap.photo_filename from smlc_acr_photos sap where
sap.photo_mls_number = sa.mls_number) as photo_filename
from smlc_acr sa
order by sa.list_price

The only thing you may want to consider here is to include an order by
on the subquery so that you get the first photo you want.

Cheers,
Kris

  What I want to do is get each property and the first
  photo for that property.

  Here's what I've tried:

 select distinct sa.street_number, sa.street_name, sa.city, 
 sa.public_remarks_01,
  sa.public_remarks_02, sa.public_remarks_03,
sa.list_price, sap.photo_filename
 from smlc_acr sa, smlc_acr_photos sap
  where sa.mls_number = sap.photo_mls_number
order by list_price

  That doesn't work, because each row is distinct because of the new photo.

  I tried joins, but couldn't get that to work.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303253
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT - Database schema compare/sync tools for MSSQL

2008-04-13 Thread Jim Wright
On Thu, Apr 3, 2008 at 11:16 AM, Gerald Guido [EMAIL PROTECTED] wrote:
 Does anyone know of a good tool that compares and/or syncs up Database
  schema's for two tables/DBs. I want to grab fresh data off of production and
  at the same time not have to manually update the schema for all the changes
  I made.

  SQLYog for MySQL has a great tool that will generate the SQL to compare and
  sync up the schema (and data FTM) for two tables/db's

  We are on 2005 standard.

While you can't really go wrong with Red-Gate, as many people have
recommended...I'd also take a look at Apex:
http://www.apexsql.com/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303254
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How to write this query?

2008-04-13 Thread Jim Wright
On Sun, Apr 13, 2008 at 8:27 AM, Kris Jones [EMAIL PROTECTED] wrote:
 How about something like:

  select sa.street_number, sa.street_name, sa.city,
  sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
  sa.list_price,
  (select top 1 sap.photo_filename from smlc_acr_photos sap where
  sap.photo_mls_number = sa.mls_number) as photo_filename
  from smlc_acr sa
  order by sa.list_price

  The only thing you may want to consider here is to include an order by
  on the subquery so that you get the first photo you want.


If you have a unique and predictable (1,2,3) order by field, you could
also do something like:

SELECT sa.street_number, sa.street_name, sa.city,
sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
sa.list_price,p.photo_filename
FROM smlc_acr sa LEFT JOIN smlc_acr_photos p ON p.photo_mls_number =
sa.mls_number AND p.sortorder = 1
ORDER BY sa.list_price

OR

SELECT sa.street_number, sa.street_name, sa.city,
sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
sa.list_price,p.photo_filename
FROM smlc_acr sa LEFT JOIN (SELECT photo_mls_number,photo_filename
FROM smlc_acr_photos WHERE sortorder = 1) p ON p.photo_mls_number =
sa.mls_number
ORDER BY sa.list_price

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303255
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CF7 Verity Issues. Any help/comments would be appreciated

2008-04-13 Thread Joe Bernard
We are also seeing this issue, but on ColdFusion 8.0.1.

We are also very careful to single thread the process that indexes our 
collections, but every once in a while a collection is left in a state that 
causes this error (1750 and 2). We've been having this error since CF6. Any 
further advice would be appreciated.

There was a problem executing the cfSearch tag with the following collections. 
Collection (status code): auctionscollectionprimary (-2)

Stack trace:
coldfusion.tagext.search.SearchTag$SearchAuthenticationException: There was a 
problem executing the cfSearch tag with the following collections. at 
coldfusion.tagext.search.SearchTag.doSearch(SearchTag.java:282) at 
coldfusion.tagext.search.SearchTag.doStartTag(SearchTag.java:159) at 
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661) at 
cfact_search_auctions2ecfm1040202400._factor0(D:\inetpub\wwwroot\CustomTags\site\action\act_search_auctions.cfm:142)
 at 
cfact_search_auctions2ecfm1040202400._factor3(D:\inetpub\wwwroot\CustomTags\site\action\act_search_auctions.cfm:132)
 at 
cfact_search_auctions2ecfm1040202400._factor11(D:\inetpub\wwwroot\CustomTags\site\action\act_search_auctions.cfm:131)
 at 
cfact_search_auctions2ecfm1040202400._factor14(D:\inetpub\wwwroot\CustomTags\site\action\act_search_auctions.cfm:130)
 at 
cfact_search_auctions2ecfm1040202400._factor45(D:\inetpub\wwwroot\CustomTags\site\action\act_search_auctions.cfm:111)
 at 
cfact_search_auctions2ecfm1040202400.runPage(D:\inetpub\wwwroot\CustomTags\site\action\act_search_auctions.cfm:1)
 at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at 
coldfusion.filter.CFVariablesScopeFilter.invoke(CFVariablesScopeFilter.java:63) 
at coldfusion.tagext.lang.ModuleTag.doStartTag(ModuleTag.java:280) at 
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661) at 
cfindex2ecfm1952396859.runPage(D:\inetpub\wwwroot\site\cfml\auctions\index.cfm:68)
 at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at 
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at 
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at 
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279) at 
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at 
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at 
coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at 
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at 
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74) at 
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
 at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at 
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at 
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at 
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at 
coldfusion.CfmServlet.service(CfmServlet.java:175) at 
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at 
jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at 
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
 at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at 
jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at 
jrun.servlet.FilterChain.service(FilterChain.java:101) at 
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at 
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at 
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at 
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at 
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at 
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) 
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) 

 Sorry to bring up such an old post, but Asha (or anyone else), could 
 you point me towards the documentation regarding this?
 
 
 We're running into a similar issue with one of our collection-based 
 scheduled tasks, but not with the others.
 
 
 Thanks!
 
 ~James
 
 Hi Rich,
 
 This happens when you try to access a cfm which includes cfindex 
 action=refresh..
 simultaneously from different browsers.
 
 Thanks,
 Asha. 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303256
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


ColdFusion 8 Print Page Options Best Practices

2008-04-13 Thread James Blaha
All,

If you have a CF page that basic in design standards i.e. dynamic HTML tables 
with a basic header and footer that are included and you want to provide a 
print page option that when clicked will generate and PDF on the fly, serve it 
to the user, only minus the header, footer, what’s the best practice to setup 
your code using logic that will work in CF8?

Regards,
-Jim



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303257
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Should I uninstall ColdFusion MX7 after CF8 upgrade?

2008-04-13 Thread James Blaha
Hi Nate,

When I went from 7 to 8 I uninstalled 7 and did a clean install of CF8 Ent. 
Thinking back I had issues when I wanted to clean up my CFMX7 directories on 
the server. 

-Jim 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303258
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: weird issue in browser with cf8 and long execution times

2008-04-13 Thread James Blaha
Hi Randy,

I would try re-mapping your IIS or web server settings using the CF Web Server 
Configuration Tool.

-Jim 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303259
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: A Better Coldfusion Search Form.

2008-04-13 Thread James Blaha
Hi Colin,

Dont forget to use your cfqueryparam tags in your queries.

-Jim 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303260
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: How to write this query?

2008-04-13 Thread Rick Faircloth
Hi, Jim, et al...

No sort order field, but this solution is working well:

  select sa.street_number, sa.street_name, sa.city, sa.public_remarks_01,
 sa.public_remarks_02, sa.public_remarks_03, sa.list_price,
 (select sap.photo_filename
from smlc_acr_photos sap
   where sap.photo_mls_number = sa.mls_number limit 1)
  as photo_filename
from smlc_acr sa
order by sa.list_price

Thanks everyone for the help!

Rick

 -Original Message-
 From: Jim Wright [mailto:[EMAIL PROTECTED]
 Sent: Sunday, April 13, 2008 10:42 AM
 To: CF-Talk
 Subject: Re: How to write this query?
 
 On Sun, Apr 13, 2008 at 8:27 AM, Kris Jones [EMAIL PROTECTED] wrote:
  How about something like:
 
   select sa.street_number, sa.street_name, sa.city,
   sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
   sa.list_price,
   (select top 1 sap.photo_filename from smlc_acr_photos sap where
   sap.photo_mls_number = sa.mls_number) as photo_filename
   from smlc_acr sa
   order by sa.list_price
 
   The only thing you may want to consider here is to include an order by
   on the subquery so that you get the first photo you want.
 
 
 If you have a unique and predictable (1,2,3) order by field, you could
 also do something like:
 
 SELECT sa.street_number, sa.street_name, sa.city,
 sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
 sa.list_price,p.photo_filename
 FROM smlc_acr sa LEFT JOIN smlc_acr_photos p ON p.photo_mls_number =
 sa.mls_number AND p.sortorder = 1
 ORDER BY sa.list_price
 
 OR
 
 SELECT sa.street_number, sa.street_name, sa.city,
 sa.public_remarks_01, sa.public_remarks_02, sa.public_remarks03,
 sa.list_price,p.photo_filename
 FROM smlc_acr sa LEFT JOIN (SELECT photo_mls_number,photo_filename
 FROM smlc_acr_photos WHERE sortorder = 1) p ON p.photo_mls_number =
 sa.mls_number
 ORDER BY sa.list_price
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303261
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Pagination CFC: How to pass search parameters?

2008-04-13 Thread Rick Faircloth
Hi, all (and Nathan in particular)...

I've moved from using a typical Previous / Next
pagination to using Nathan Strutz' Pagination.cfc
http://www.dopefly.com/projects/pagination/pagination_cfc_documentation.cfm

It works very well!

However, I've realized a problem, not with the cfc, but
with not using my Previous / Next images, which were actually
form submit buttons and would submit my form fields both visible
and hidden when they were clicked.

Now that I'm using the Pagination.cfc, I have the text links that are
created, but no buttons to use for submitted the form search parameter fields.

How can I pass search parameters when the links of the pagination are clicked?

I'm sure I'm just not seeing something that's a simple solution.

Suggestions, anyone?

Thanks,

Rick


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303262
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: A Better Coldfusion Search Form.

2008-04-13 Thread James Holmes
And for Oracle:

http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/toc.htm

http://download.oracle.com/docs/cd/B19306_01/text.102/b14217/toc.htm

On Sun, Apr 13, 2008 at 4:16 AM, Scott Pinkston [EMAIL PROTECTED] wrote:
 Look up freetext or fulltext depending on the db engine.

  MySQL:
  http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

  SQL Server:
  http://msdn2.microsoft.com/en-us/library/ms176078.aspx



   Hi,
  
   I'm trying to figure out how to create a dynamic search form using
   Coldfusion 8.
  
   Right now if I enter multiple words in my search field the results
   omit certain records. For example, if I put toy blue in the search
   field it will return results that only have TOY BLUE together and
   omits any records that only have TOY or only have Blue in the
   column being searched.
  
   Is there a way to add the following abilities to my basic search code
   located at the bottom of my post:
  
   - Search multiple words that are entered in the criteria input field.
   - The words can be separated by commas, spaces, or the word and.
   - Have it so you can search multiple word phrases by using quotes.
  
   !--- Search Form---

  

   form name=myForm method=post action=results.cfm

   p

   input name=criteria type=text id=criteria

   input type=submit name=Submit value=Submit

   /p

   /form
  
   !--- Results Page ---
  
   cfquery name=qSearch datasource=myDatabase dbtype=ODBC
 SELECT itemID, itemName

   FROM myTable

   WHERE 1 = 1
  
 cfif IsDefined(form.criteria) AND Len(Trim(form.criteria))

   and (itemName LIKE '%#form.criteria#%' or itemDescription LIKE '%#form.
   criteria#%')
 /cfif
  
   /cfquery
  
   pbResults:/b/p
   cfoutput query=qSearch
 p#itemid# - #itemName#/p
   /cfoutput
  
   !-
  
   Any help would be greatly appreciated.
  
   Thanks
  
   -C


  

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303263
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4