koloa
December 31, 2006, 6:15am
1
hi, i have this statement
User.find_by_sql (“SELECT Users.id, COUNT(Howtos.user_id) FROM Howtos,
Users WHERE Howtos.user_id = Users.id GROUP BY Users.id”)
this works on my local setup, but when i moved my application to another
server, i get an error message that my Howtos table does not exist.
thoughts?
koloa
December 31, 2006, 6:51am
2
Was your migrations successful? Did you check the database to see if it
really is there?
koloa
December 31, 2006, 7:08am
3
yes, i have other functions that i call that accesses the howto table
and display that in a view… hmmmm.
koloa
December 31, 2006, 7:21am
4
Hi, please try running the SQL query on the remote machine at the
command line for the db engine. Then report the error message that
you’re receiving.
-Conrad
koloa
December 31, 2006, 7:28am
5
hello, here is what i got
mysql> SELECT Users.id, Users.login, COUNT(Howtos.user_id) as numhowtos
FROM Howtos, Users WHERE Howtos.user_id = Users.id GROUP BY Users.id;
ERROR 1146 (42S02): Table ‘myname_myfirstapp.Howtos’ doesn’t exist
Conrad T. wrote:
Hi, please try running the SQL query on the remote machine at the
command line for the db engine. Then report the error message that
you’re receiving.
-Conrad
koloa
December 31, 2006, 7:47am
6
Hi, try using ‘howtos’ instead of ‘Howtos’ for your table name. Let
me know what happens.
-Conrad
koloa
December 31, 2006, 7:31am
7
i have other functions that i call on my howtos table that populate my
index page. after i comment out the sql statement, my other functions
work fine…im not sure what is happening.
koloa
December 31, 2006, 4:30pm
8
Hi Conrad, Awesome thanks!
it started working when i made everything lower case.
much appreciation to all!