return representationOf(qResult).withStatus(200);
[1,"John","Fuqua"],
I thought it returned JSON as the default...
{ "userID": 1, "FirstName": "John", "LastName": "Fuqua", }, { "userID": 1, "FirstName": Mark, "LastName": "Fuqua", }, { "userID": 1, "FirstName": "Bill", "LastName": "Jones", },
--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thank you Adam…I hope I’m not pushing the bounds of your good will, but…seems like I have a new error, you can see the error here:
http://www.mdcommercial.com/api/index.cfm/people
Here is the code for the component:
component
extends="taffy.core.resource"
taffy_uri="/people"
{
public function get()
{
qGetPersonCollection = new Query(); // new query object
qGetPersonCollection.setSQL("SELECT UserID, FirstName, LastName FROM PlumUser"); //set query
qResult = qGetPersonCollection.execute(); // execute query
return representationOf(queryToArray(qResult)).withStatus(200);
}
}
It is pretty much copied and changed from the docs…I should probably mention, this is my first cfscript as well…though it was returning the result before, just in the ‘wrong’ format. I simply added the queryToArray.
Thanks,
Mark
Adam
--
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/joFJ0imdYaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taffy-users...@googlegroups.com.
Thank you Adam…I hope I’m not pushing the bounds of your good will, but…seems like I have a new error, you can see the error here:
http://www.mdcommercial.com/api/index.cfm/people
Here is the code for the component:
component
extends="taffy.core.resource"
taffy_uri="/people"
{
public function get()
{
qGetPersonCollection = new Query(); // new query object
qGetPersonCollection.setSQL("SELECT UserID, FirstName, LastName FROM PlumUser"); //set query
qResult = qGetPersonCollection.execute(); // execute query
return representationOf(queryToArray(qResult)).withStatus(200);
}
}
It is pretty much copied and changed from the docs…I should probably mention, this is my first cfscript as well…though it was returning the result before, just in the ‘wrong’ format. I simply added the queryToArray.
Thanks,
Mark
Adam
--
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/joFJ0imdYaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users+unsubscribe@googlegroups.com.
Adam,
qResult = qGetPersonCollection.execute().getResult();
Worked perfectly.
This is the first time (I can’t believe I’m admitting this ‘outloud’) I’ve used application.cfc, cfscript or Taffy.
The framework I’ve been using since 2007 uses application.cfm…
Time to put on my big boy pants…thanks for the help.
Mark
From: taffy...@googlegroups.com [mailto:taffy...@googlegroups.com] On Behalf Of Adam Tuttle
Sent: Tuesday, February 14, 2017 11:13 AM
To: Taffy Users <taffy...@googlegroups.com>
Subject: Re: Newbie question about returned data
Hi Mark,
I would advise you not to use the query cfc object. If you're on a platform that supports it (CF11+), queryExecute() is a much better alternative.
Hope that helps,
Adam
Adam
--
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/joFJ0imdYaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/joFJ0imdYaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taffy-users...@googlegroups.com.
Hope that helps,
Adam
Adam
--
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/joFJ0imdYaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Taffy Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/taffy-users/joFJ0imdYaY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to taffy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users+unsubscribe@googlegroups.com.