Sql statement works on local box but not on server?

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?

Was your migrations successful? Did you check the database to see if it
really is there?

yes, i have other functions that i call that accesses the howto table
and display that in a view… hmmmm.

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

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

Hi, try using ‘howtos’ instead of ‘Howtos’ for your table name. Let
me know what happens.

-Conrad

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.

Hi Conrad, Awesome thanks!

it started working when i made everything lower case.

much appreciation to all!