Displaying 1 result from an estimated 1 matches for "newobject2".
Did you mean:
newobject
2006 Feb 05
0
Database Querry without a Object or Model associated with it
...and are MySQL that I could just execute a query that is
similar to this:
SELECT DB1.table1.field1
FROM DB1.table1 WHERE DB1.table1.field2 = @object.id
The problem I am having is that i can''t figure out how to execute
this query without a model associated with it. I have tried:
newobject2 = Object.find_by_sql("SELECT DB1.table1.field1FROM
DB1.table1 WHERE DB1.table1.field2 = @object.id")
But I get an error that says that Object has no idea what field1 is
(which is true since field1 is not part of the Object. is just a
value (and in all instances will be just one val...