cfquery and json
Hi I am new to coldfusion 9 and extjs 4 and like to know how to pass a cfquery to a mysql table, and then covert the data to json to populate a grid.. Would appreciate some help on this matter also if there are any tutorials for newbies. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349369 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfquery and json
Start here and let us know if you have any trouble: http://www.cfscreencast.com/2007/12/6/retrieving-data-from-mysql-using-cfquery/ http://www.coldfusion-ria.com/Blog/index.cfm/2009/12/14/ExtJS-30-Editor-Grid-with-ColdFusion (I didn't see an ExtJS 4 example on Google. Perhaps 3 will work for you?) Tutorials for newbies: http://www.easycfm.com/ http://www.sitepoint.com/cold-fusion-tutorial/ http://www.tomkitta.com/guides/cf_101.cfm etc On Tue, Jan 10, 2012 at 4:57 AM, Tom Small t...@re-base.net wrote: Hi I am new to coldfusion 9 and extjs 4 and like to know how to pass a cfquery to a mysql table, and then covert the data to json to populate a grid.. Would appreciate some help on this matter also if there are any tutorials for newbies. Thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349370 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfquery and json
Thanks for your assistance ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349371 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Extjs4
Hi, I have built a grid panel via extjs4 and want to link the data store to a mysql table, which is stored locally on my machine. Is there any examples for newbie that will walk me through how to achieve this? thanks Tom ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349372 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
extjs4 designer
Hi, I have built a grid panel via extjs designer and want to link the data store to a mysql table, which is stored locally on my machine. Is there any examples for newbie that will walk me through how to achieve this? thanks Tom ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349373 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Convert php to cfm
Hi, I need to convert php to coldfusion. Would appreciate some help, thanks ?php #First we include our credentials file # FileName=connect.php $hostname = localhost; $database = nimsoftslmdev; $username = root; $password = xxx; #And now we connect to the database //connection String //connection String $con = mysql_connect($hostname, $username, $password) or die('Could not connect: ' . mysql_error()); //select database mysql_select_db($database, $con); //Select The database $bool = mysql_select_db($database, $con); if ($bool === False){ print can't find $database; } $start = ($_REQUEST[start] == null)? 0 : $_REQUEST[start]; $limit = ($_REQUEST[limit] == null)? 200 : $_REQUEST[limit]; // Gather all pending requests $query = SELECT nimid, level, message, source FROM nas_alarms ; $query .= ORDER BY level ASC ; $query .= LIMIT .$start.,.$limit; $result = mysql_query($query, $con); // Here we do the count $query_c = SELECT nimid, level, message, source FROM nas_alarms ; //get total $count_result = mysql_query($query_c, $con); $total = mysql_num_rows($count_result); if (mysql_num_rows($result) 0){ while($obj = mysql_fetch_object($result)) { $arr[] = $obj; } // Now create the json array to be sent to our datastore $myData = array('myInventory' = $arr, 'totalCount' = $total); echo json_encode($myData); return; exit(); } else { // If no requests found, we return nothing $myData = array('myInventory' = '', 'totalCount' = '0'); echo json_encode($myData); return; exit(); } ? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349374 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Convert php to cfm
This seems like a pretty straightforward conversion. Create the datasource in the CF admin to point to MySQL and then simply write a cfquery with the same basic syntax as is used in the PHP. Specify maxrows=200 and then cfoutput it via json to your datastore. I might be missing something but it seems that simple. -Original Message- From: Tom Small [mailto:t...@re-base.net] Sent: 10 January 2012 15:47 To: cf-talk Subject: Convert php to cfm Hi, I need to convert php to coldfusion. Would appreciate some help, thanks ?php #First we include our credentials file # FileName=connect.php $hostname = localhost; $database = nimsoftslmdev; $username = root; $password = xxx; #And now we connect to the database //connection String //connection String $con = mysql_connect($hostname, $username, $password) or die('Could not connect: ' . mysql_error()); //select database mysql_select_db($database, $con); //Select The database $bool = mysql_select_db($database, $con); if ($bool === False){ print can't find $database; } $start = ($_REQUEST[start] == null)? 0 : $_REQUEST[start]; $limit = ($_REQUEST[limit] == null)? 200 : $_REQUEST[limit]; // Gather all pending requests $query = SELECT nimid, level, message, source FROM nas_alarms ; $query .= ORDER BY level ASC ; $query .= LIMIT .$start.,.$limit; $result = mysql_query($query, $con); // Here we do the count $query_c = SELECT nimid, level, message, source FROM nas_alarms ; //get total $count_result = mysql_query($query_c, $con); $total = mysql_num_rows($count_result); if (mysql_num_rows($result) 0){ while($obj = mysql_fetch_object($result)) { $arr[] = $obj; } // Now create the json array to be sent to our datastore $myData = array('myInventory' = $arr, 'totalCount' = $total); echo json_encode($myData); return; exit(); } else { // If no requests found, we return nothing $myData = array('myInventory' = '', 'totalCount' = '0'); echo json_encode($myData); return; exit(); } ? ~~ ~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion- Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf- talk/message.cfm/messageid:349374 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf- talk/unsubscribe.cfm ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349375 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Convert php to cfm
Wow, and I wonder at times why PHP is so popular... Not being a Guru at PHP what you are trying to convert here is very simple, and this is not tested but as close to being right as I can think. cfquery name=result datasource= username=#username# passwqord=#password# SELECT nimid, level, message, source FROM nas_alarms LIMIT #url.start#, #url.limit# /cfquery Now I have not included the required cfqueryparams, which you should look into as a security measure. Once you have this returned the variable result will hold the query. So when you want the number of records returned you can use result.recordCount as the number of records returned. When you talk about JSon, you dont mention which version of ColdFusion, so you can either use the library from CFlibs to create the JSOn or you can use ColdFusion to create the JSON. Eitherway the amount of code is much simpler than what you have there in the PHP. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Wed, Jan 11, 2012 at 2:47 AM, Tom Small t...@re-base.net wrote: Hi, I need to convert php to coldfusion. Would appreciate some help, thanks ?php #First we include our credentials file # FileName=connect.php $hostname = localhost; $database = nimsoftslmdev; $username = root; $password = xxx; #And now we connect to the database //connection String //connection String $con = mysql_connect($hostname, $username, $password) or die('Could not connect: ' . mysql_error()); //select database mysql_select_db($database, $con); //Select The database $bool = mysql_select_db($database, $con); if ($bool === False){ print can't find $database; } $start = ($_REQUEST[start] == null)? 0 : $_REQUEST[start]; $limit = ($_REQUEST[limit] == null)? 200 : $_REQUEST[limit]; // Gather all pending requests $query = SELECT nimid, level, message, source FROM nas_alarms ; $query .= ORDER BY level ASC ; $query .= LIMIT .$start.,.$limit; $result = mysql_query($query, $con); // Here we do the count $query_c = SELECT nimid, level, message, source FROM nas_alarms ; //get total $count_result = mysql_query($query_c, $con); $total = mysql_num_rows($count_result); if (mysql_num_rows($result) 0){ while($obj = mysql_fetch_object($result)) { $arr[] = $obj; } // Now create the json array to be sent to our datastore $myData = array('myInventory' = $arr, 'totalCount' = $total); echo json_encode($myData); return; exit(); } else { // If no requests found, we return nothing $myData = array('myInventory' = '', 'totalCount' = '0'); echo json_encode($myData); return; exit(); } ? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349376 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Convert php to cfm
On Tue, Jan 10, 2012 at 8:01 AM, Andrew Scott andr...@andyscott.id.au wrote: Wow, and I wonder at times why PHP is so popular... Because it is cheaper to run it.. Nevermind the fact that you are paying developers allot more (as in, it takes more time) to code in PHP. :) Note the Sarcasm of the first sentence. :) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349377 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Convert php to cfm
-Original Message- Wow, and I wonder at times why PHP is so popular... My thought too, this is a great example of why I love CF over PHP :) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349378 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Convert php to cfm
Hi Andrew, thanks for your help and advice ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349379 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Rialo or Open Blue Dragon
here's the link to the tomcat based installers for Railo and OBD. Both of these install on IIS. More information here: http://www.viviotech.net/company/installers.cfm but I've installed the OBD one on several servers and found no problems. One of the easiest installs I've done. hth, larry So you have a link? I'm mobile at the moment. By the way, would anybody be up for a Skype call this evening (us central time)? I had an idea I sent over the list a bit ago that I wanted to bounce off f some other folks for creating an open source repository of components similar to CPAN (search.cpan.org) for Perl. -- ~ Mike Stemle, Jr. On Jan 7, 2012, at 11:15, Judah McAuley ju...@wiredotter.com wrote: Railo has fairly new installers done by Jordan Michaels at Vivotech (a great place to host, btw). If you haven't tried them out, you ought to. They work quite nicely on Windows and Linux (and OS X I believe, though I've not used them there). It takes care of the Apache setup and installs Tomcat as the J2EE servlet container. OpenBD has been quite active recently pushing out new releases. I haven't used it extensively, just some basic compatibility testing. It seems to work just fine as far as I can tell, but I'm not running any Fusebox apps. In terms of inexpensive hosting, it should be noted that OpenBD runs on Google App Engine, so that might be an interesting option to look into. Cheers, Judah On Sat, Jan 7, 2012 at 8:30 AM, Michael Stemle themanchicken@gmail. com wrote: Railo claims that Fusebox is compatible from what I can see. I've only played with Railo so far, but both of them seem like a bit of a pain to install on anything but Windows. That said, I run regular apache, so maybe that's what makes it complicated. I'm running my CCFAN development stuff on cfmldeveloper.com for now. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349380 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Troubleshooting slow web service calls
I have a web service created in coldfusion, and consumed from a coldfusion page. The problem is that the web service call is very fast in development environment, where as its very very slow in production environment. What is the best way to go about troubleshooting what is causing the problem? The database calls are fast too. Any help would be great. Thanks, ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349381 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Troubleshooting slow web service calls
I would approach this by writing a test against the webservice, and then throwing a little bit of benchmarking code into the procedures you call. That should give you some sort of idea as to which parts of the procedure are running slower than expected. On Tue, Jan 10, 2012 at 15:39, fun and learning funandlrnn...@gmail.comwrote: I have a web service created in coldfusion, and consumed from a coldfusion page. The problem is that the web service call is very fast in development environment, where as its very very slow in production environment. What is the best way to go about troubleshooting what is causing the problem? The database calls are fast too. Any help would be great. Thanks, ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349382 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
anyone using ckeditor? I will PAY you for your help!
Hi All I have had a year long headache with ckeditor and it changing my CF code. I got around the issue for a while by using a straight text area to enter code in the DB. Now other users will be using the system and I need to get the text editor to work. I STILL have not been able to figure out how to stop this thing from editing my CF code and I am beyond frustrated with it. I tried installing tinyMCE (sp?) and it did the same thing. Has anyone installed and used ckeditor properly with Coldfusion to where it is keeping your CF code in tact? I will pay for your help (that is how desperate I am) Thank you! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349383 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: anyone using ckeditor? I will PAY you for your help!
Are you trying to enter CF code into the editor and expect it to come through intact? There is quite a community of tech-savvy users on the CKEditor forum - have you checked there? It includes some CF people. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month On Wed, Jan 11, 2012 at 11:51 AM, Torrent Girl moniqueb...@gmail.comwrote: Hi All I have had a year long headache with ckeditor and it changing my CF code. I got around the issue for a while by using a straight text area to enter code in the DB. Now other users will be using the system and I need to get the text editor to work. I STILL have not been able to figure out how to stop this thing from editing my CF code and I am beyond frustrated with it. I tried installing tinyMCE (sp?) and it did the same thing. Has anyone installed and used ckeditor properly with Coldfusion to where it is keeping your CF code in tact? I will pay for your help (that is how desperate I am) Thank you! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349384 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: anyone using ckeditor? I will PAY you for your help!
both ckeditor and TinyMCE have filters to disallow.remove dangerous tags and content. If you are using the editor to edit CFML code, then it would get changed. So you need to change the default settings. The easiest way would be to just set it to allow everything, or set the disallow list to nothing. I don't know the syntax of fthe top of my head, but it id definitely there in the docs as I have done this myself in the past On Wed, Jan 11, 2012 at 12:51 AM, Torrent Girl moniqueb...@gmail.comwrote: Hi All I have had a year long headache with ckeditor and it changing my CF code. I got around the issue for a while by using a straight text area to enter code in the DB. Now other users will be using the system and I need to get the text editor to work. I STILL have not been able to figure out how to stop this thing from editing my CF code and I am beyond frustrated with it. I tried installing tinyMCE (sp?) and it did the same thing. Has anyone installed and used ckeditor properly with Coldfusion to where it is keeping your CF code in tact? I will pay for your help (that is how desperate I am) Thank you! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349385 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: anyone using ckeditor? I will PAY you for your help!
You should take a look at the protectedSource method in the config settings (http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.protectedSource). This allows you to use regular expressions to specify which tags should not be affected by the editor. On Tue, Jan 10, 2012 at 7:51 PM, Torrent Girl moniqueb...@gmail.com wrote: Hi All I have had a year long headache with ckeditor and it changing my CF code. I got around the issue for a while by using a straight text area to enter code in the DB. Now other users will be using the system and I need to get the text editor to work. I STILL have not been able to figure out how to stop this thing from editing my CF code and I am beyond frustrated with it. I tried installing tinyMCE (sp?) and it did the same thing. Has anyone installed and used ckeditor properly with Coldfusion to where it is keeping your CF code in tact? I will pay for your help (that is how desperate I am) Thank you! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349386 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm